Address review comments
- Add a comment for IPFSNotConnectedPage. - Strings changes. - Fix typo in a comment. - clang-format
This commit is contained in:
@@ -686,7 +686,7 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U
|
||||
IPFS public gateway fallback
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_IPFS_AUTO_FALLBACK_TO_GATEWAY_DESC" desc="The description for the switch of automatically fallback to IPFS public gateway">
|
||||
Automatically fallback to IPFS public gateway when failed to access through the local node.
|
||||
Automatically fallback to IPFS public gateway when the local node cannot be accessed.
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_HANGOUTS_ENABLED_DESC" desc="The description for Hangouts switch in settings">
|
||||
Uses Hangouts component to enable screen sharing and other features in the browser.
|
||||
|
||||
@@ -95,7 +95,8 @@ IpfsNavigationThrottle::WillStartRequest() {
|
||||
return content::NavigationThrottle::PROCEED;
|
||||
}
|
||||
|
||||
bool is_local_mode = pref_service_->FindPreference(kIPFSResolveMethod) &&
|
||||
bool is_local_mode =
|
||||
pref_service_->FindPreference(kIPFSResolveMethod) &&
|
||||
pref_service_->GetInteger(kIPFSResolveMethod) ==
|
||||
static_cast<int>(ipfs::IPFSResolveMethodTypes::IPFS_LOCAL);
|
||||
|
||||
@@ -170,8 +171,7 @@ void IpfsNavigationThrottle::LoadPublicGatewayURL() {
|
||||
if (!web_contents)
|
||||
return;
|
||||
|
||||
const GURL url = IpfsUtils::ToPublicGatewayURL(
|
||||
navigation_handle()->GetURL());
|
||||
const GURL url = IpfsUtils::ToPublicGatewayURL(navigation_handle()->GetURL());
|
||||
if (url.is_empty())
|
||||
return;
|
||||
|
||||
|
||||
@@ -45,10 +45,9 @@ const GURL& GetIPFSURL() {
|
||||
}
|
||||
|
||||
const GURL& GetIPNSURL() {
|
||||
static const GURL
|
||||
ipns_url(
|
||||
"http://localhost:8080/ipns/tr.wikipedia-on-ipfs.org/wiki/"
|
||||
"Anasayfa.html"); // NOLINT
|
||||
static const GURL ipns_url(
|
||||
"http://localhost:8080/ipns/tr.wikipedia-on-ipfs.org/wiki/"
|
||||
"Anasayfa.html"); // NOLINT
|
||||
return ipns_url;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@ class SecurityInterstitialControllerClient;
|
||||
|
||||
namespace ipfs {
|
||||
|
||||
// IPFSNotConnectedPage is the interstitial page which will be shown when the
|
||||
// browser failed to access IPFS contents through the local node due to no
|
||||
// connected peers or it fails to start the daemon during page load. A proceed
|
||||
// button is provided in the page to turn on the setting for automatically
|
||||
// fallback to the public gateway in these cases.
|
||||
class IPFSNotConnectedPage
|
||||
: public security_interstitials::SecurityInterstitialPage {
|
||||
public:
|
||||
|
||||
@@ -46,7 +46,7 @@ GURL IpfsUtils::ToPublicGatewayURL(const GURL& url) {
|
||||
DCHECK(IsIPFSScheme(url) || IsIPFSURL(url));
|
||||
GURL new_url;
|
||||
|
||||
// For ipfs/ipfs schemes, use TranslateIPFSURI directly.
|
||||
// For ipfs/ipns schemes, use TranslateIPFSURI directly.
|
||||
if (IsIPFSScheme(url) && TranslateIPFSURI(url, &new_url, false)) {
|
||||
return new_url;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
Hide Advanced
|
||||
</message>
|
||||
<message name="IDS_IPFS_NOT_CONNECTED_EXPLANATION" desc="The text of the IPFS not connected interstitial that will be displayed when the user presses the 'Advanced' button for additional information.">
|
||||
We cannot connect to the requested content using the local IPFS node at the moment because the local node doesn't seem to start or there are no connected peers available at the moment. By proceeding we will automatically fallback to the default public gateway in the future when we cannot connect to IPFS contents using the local IPFS node, this could be turned off later in settings.
|
||||
We cannot connect to the requested content using the local IPFS node because the local node didn't start or because there are no connected peers available at the moment. By proceeding, we will automatically fallback to the default public gateway in the future when we cannot connect to IPFS content using the local IPFS node. This can be turned off later in settings.
|
||||
</message>
|
||||
</if>
|
||||
</grit-part>
|
||||
|
||||
Reference in New Issue
Block a user