Revert "Merge pull request #8299 from brave/revert_8257"
This reverts commit96aebb9ee6, reversing changes made to7e073b26c1.
This commit is contained in:
@@ -34,6 +34,13 @@ public class BravePrefServiceBridge {
|
||||
BravePrefServiceBridgeJni.get().setHTTPSEEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param whether the IPFS gateway should be enabled.
|
||||
*/
|
||||
public void setIpfsGatewayEnabled(boolean enabled) {
|
||||
BravePrefServiceBridgeJni.get().setIpfsGatewayEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param whether google login is enabled on third party sites.
|
||||
*/
|
||||
@@ -198,6 +205,7 @@ public class BravePrefServiceBridge {
|
||||
@NativeMethods
|
||||
interface Natives {
|
||||
void setHTTPSEEnabled(boolean enabled);
|
||||
void setIpfsGatewayEnabled(boolean enabled);
|
||||
void setAdBlockEnabled(boolean enabled);
|
||||
void setFingerprintingProtectionEnabled(boolean enabled);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.chromium.components.user_prefs.UserPrefs;
|
||||
|
||||
public class BravePrivacySettings extends PrivacySettings {
|
||||
private static final String PREF_HTTPSE = "httpse";
|
||||
private static final String PREF_IPFS_GATEWAY = "ipfs_gateway";
|
||||
private static final String PREF_AD_BLOCK = "ad_block";
|
||||
private static final String PREF_FINGERPRINTING_PROTECTION = "fingerprinting_protection";
|
||||
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
@@ -50,6 +51,7 @@ public class BravePrivacySettings extends PrivacySettings {
|
||||
private ChromeSwitchPreference mAutocompleteTopSites;
|
||||
private ChromeSwitchPreference mAutocompleteBraveSuggestedSites;
|
||||
private ChromeBaseCheckBoxPreference mHttpsePref;
|
||||
private ChromeBaseCheckBoxPreference mIpfsGatewayPref;
|
||||
private ChromeBaseCheckBoxPreference mAdBlockPref;
|
||||
private ChromeBaseCheckBoxPreference mFingerprintingProtectionPref;
|
||||
private ChromeBaseCheckBoxPreference mCloseTabsOnExitPref;
|
||||
@@ -69,6 +71,9 @@ public class BravePrivacySettings extends PrivacySettings {
|
||||
mHttpsePref = (ChromeBaseCheckBoxPreference) findPreference(PREF_HTTPSE);
|
||||
mHttpsePref.setOnPreferenceChangeListener(this);
|
||||
|
||||
mIpfsGatewayPref = (ChromeBaseCheckBoxPreference) findPreference(PREF_IPFS_GATEWAY);
|
||||
mIpfsGatewayPref.setOnPreferenceChangeListener(this);
|
||||
|
||||
mAdBlockPref = (ChromeBaseCheckBoxPreference) findPreference(PREF_AD_BLOCK);
|
||||
mAdBlockPref.setOnPreferenceChangeListener(this);
|
||||
|
||||
@@ -119,6 +124,8 @@ public class BravePrivacySettings extends PrivacySettings {
|
||||
String key = preference.getKey();
|
||||
if (PREF_HTTPSE.equals(key)) {
|
||||
BravePrefServiceBridge.getInstance().setHTTPSEEnabled((boolean) newValue);
|
||||
} else if (PREF_IPFS_GATEWAY.equals(key)) {
|
||||
BravePrefServiceBridge.getInstance().setIpfsGatewayEnabled((boolean) newValue);
|
||||
} else if (PREF_AD_BLOCK.equals(key)) {
|
||||
BravePrefServiceBridge.getInstance().setAdBlockEnabled((boolean) newValue);
|
||||
} else if (PREF_FINGERPRINTING_PROTECTION.equals(key)) {
|
||||
@@ -173,6 +180,7 @@ public class BravePrivacySettings extends PrivacySettings {
|
||||
getPreferenceScreen().removePreference(mSendP3A);
|
||||
}
|
||||
mHttpsePref.setOrder(++order);
|
||||
mIpfsGatewayPref.setOrder(++order);
|
||||
mAdBlockPref.setOrder(++order);
|
||||
mFingerprintingProtectionPref.setOrder(++order);
|
||||
mSearchSuggestions.setOrder(++order);
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
android:title="@string/httpse_title"
|
||||
android:summary="@string/httpse_summary"
|
||||
android:defaultValue="true" />
|
||||
<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
android:key="ipfs_gateway"
|
||||
android:title="@string/ipfs_gateway_title"
|
||||
android:summary="@string/ipfs_gateway_summary"
|
||||
android:defaultValue="true" />
|
||||
<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
android:key="ad_block"
|
||||
android:title="@string/ad_block_title"
|
||||
|
||||
+11
-3
@@ -308,13 +308,21 @@ source_set("browser_process") {
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//brave/browser/infobars",
|
||||
"//brave/components/ipfs",
|
||||
"//brave/components/services/ipfs/public/mojom",
|
||||
"//components/user_prefs",
|
||||
"//extensions/browser",
|
||||
"//extensions/common",
|
||||
]
|
||||
|
||||
if (enable_extensions) {
|
||||
deps += [
|
||||
"//extensions/browser",
|
||||
"//extensions/common",
|
||||
]
|
||||
}
|
||||
|
||||
if (!is_android) {
|
||||
deps += [ "//brave/browser/infobars" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (brave_together_enabled) {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "brave/build/android/jni_headers/BravePrefServiceBridge_jni.h"
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "base/android/jni_string.h"
|
||||
#include "brave/common/pref_names.h"
|
||||
#include "brave/components/brave_perf_predictor/browser/buildflags.h"
|
||||
@@ -13,9 +12,11 @@
|
||||
#include "brave/components/brave_rewards/common/pref_names.h"
|
||||
#include "brave/components/brave_shields/browser/brave_shields_util.h"
|
||||
#include "brave/components/brave_sync/brave_sync_prefs.h"
|
||||
#include "brave/components/ipfs/buildflags/buildflags.h"
|
||||
#include "brave/components/p3a/buildflags.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/profiles/profile_android.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
@@ -30,6 +31,11 @@
|
||||
#include "brave/components/p3a/pref_names.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IPFS_ENABLED)
|
||||
#include "brave/components/ipfs/ipfs_constants.h"
|
||||
#include "brave/components/ipfs/pref_names.h"
|
||||
#endif
|
||||
|
||||
using base::android::ConvertUTF8ToJavaString;
|
||||
using base::android::JavaParamRef;
|
||||
using base::android::ScopedJavaLocalRef;
|
||||
@@ -57,6 +63,17 @@ void JNI_BravePrefServiceBridge_SetHTTPSEEnabled(
|
||||
g_browser_process->local_state());
|
||||
}
|
||||
|
||||
void JNI_BravePrefServiceBridge_SetIpfsGatewayEnabled(JNIEnv* env,
|
||||
jboolean enabled) {
|
||||
#if BUILDFLAG(IPFS_ENABLED)
|
||||
ipfs::IPFSResolveMethodTypes type =
|
||||
enabled ? ipfs::IPFSResolveMethodTypes::IPFS_ASK
|
||||
: ipfs::IPFSResolveMethodTypes::IPFS_DISABLED;
|
||||
GetOriginalProfile()->GetPrefs()->SetInteger(kIPFSResolveMethod,
|
||||
static_cast<int>(type));
|
||||
#endif
|
||||
}
|
||||
|
||||
void JNI_BravePrefServiceBridge_SetThirdPartyGoogleLoginEnabled(
|
||||
JNIEnv* env,
|
||||
jboolean enabled) {
|
||||
|
||||
@@ -13,10 +13,14 @@
|
||||
#include "chrome/common/channel_info.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "components/keyed_service/content/browser_context_dependency_manager.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "extensions/browser/extension_registry_factory.h"
|
||||
#include "extensions/browser/extension_system.h"
|
||||
#include "extensions/browser/extension_system_provider.h"
|
||||
#include "extensions/browser/extensions_browser_client.h"
|
||||
#endif
|
||||
|
||||
namespace ipfs {
|
||||
|
||||
@@ -39,9 +43,11 @@ IpfsServiceFactory::IpfsServiceFactory()
|
||||
: BrowserContextKeyedServiceFactory(
|
||||
"IpfsService",
|
||||
BrowserContextDependencyManager::GetInstance()) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
|
||||
DependsOn(
|
||||
extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
|
||||
#endif
|
||||
}
|
||||
|
||||
IpfsServiceFactory::~IpfsServiceFactory() {}
|
||||
|
||||
@@ -190,6 +190,12 @@ This file contains all "about" strings. It is set to NOT be translated, in tran
|
||||
<message name="IDS_HTTPSE_SUMMARY" desc="Summary for HTTPS Everywhere.">
|
||||
Opens supported sites using HTTPS instead of HTTP when possible
|
||||
</message>
|
||||
<message name="IDS_IPFS_GATEWAY_TITLE" desc="Title for IPFS setting.">
|
||||
IPFS Gateway
|
||||
</message>
|
||||
<message name="IDS_IPFS_GATEWAY_SUMMARY" desc="Summary for IPFS gateway setting.">
|
||||
Allows for navigation to IPFS resources through an IPFS Gateway
|
||||
</message>
|
||||
<message name="IDS_AD_BLOCK_TITLE" desc="Title for ad block.">
|
||||
Ad Block
|
||||
</message>
|
||||
|
||||
@@ -1070,7 +1070,7 @@ void CustomizeWebUIHTMLSource(const std::string &name,
|
||||
{ "walletStatusPending", IDS_BRAVE_REWARDS_INTERNALS_WALLET_STATUS_PENDING }, // NOLINT
|
||||
}
|
||||
}, {
|
||||
#if BUILDFLAG(IPFS_ENABLED)
|
||||
#if BUILDFLAG(ENABLE_TOR)
|
||||
std::string("tor-internals"), {
|
||||
{ "tabGeneralInfo", IDS_TOR_INTERNALS_TAB_GENERAL_INFO },
|
||||
{ "tabLogs", IDS_TOR_INTERNALS_TAB_LOGS },
|
||||
|
||||
@@ -2,6 +2,7 @@ include_rules = [
|
||||
"+../../../../chrome/browser",
|
||||
"+../../../../../chrome/browser/android",
|
||||
"+../../../../../../chrome/browser/android/browsing_data",
|
||||
"+../../../../../../chrome/browser/android/omnibox",
|
||||
"+../../../../../../chrome/browser/android/preferences",
|
||||
"+../../../../../../chrome/browser/android/signin",
|
||||
"+../../../../../chrome/browser/autocomplete",
|
||||
|
||||
@@ -78,7 +78,8 @@ using ntp_background_images::features::kBraveNTPSuperReferralWallpaper;
|
||||
#define BRAVE_IPFS_FEATURE_ENTRIES \
|
||||
{"brave-ipfs", \
|
||||
flag_descriptions::kBraveIpfsName, \
|
||||
flag_descriptions::kBraveIpfsDescription, kOsDesktop, \
|
||||
flag_descriptions::kBraveIpfsDescription, \
|
||||
kOsDesktop | kOsAndroid, \
|
||||
FEATURE_VALUE_TYPE(ipfs::features::kIpfsFeature)},
|
||||
#else
|
||||
#define BRAVE_IPFS_FEATURE_ENTRIES
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "brave/browser/autocomplete/brave_autocomplete_scheme_classifier.h"
|
||||
#include "components/omnibox/browser/autocomplete_classifier.h"
|
||||
#include "components/omnibox/browser/autocomplete_controller.h"
|
||||
|
||||
#define ChromeAutocompleteSchemeClassifier BraveAutocompleteSchemeClassifier
|
||||
#include "../../../../../../chrome/browser/android/omnibox/autocomplete_controller_android.cc"
|
||||
#undef ChromeAutocompleteSchemeClassifier
|
||||
@@ -15,6 +15,8 @@
|
||||
bool ProfileIOData::IsHandledProtocol(const std::string& scheme) {
|
||||
if (scheme == kBraveUIScheme)
|
||||
return true;
|
||||
if (scheme == "ipfs" || scheme == "ipns")
|
||||
return true;
|
||||
return IsHandledProtocol_ChromiumImpl(scheme);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -93,8 +93,10 @@ source_set("common") {
|
||||
"//brave/components/external_intents/android",
|
||||
"//brave/components/webcompat_reporter/browser",
|
||||
"//brave/chromium_src/third_party/blink/renderer/modules:browser_tests",
|
||||
"//brave/components/ipfs/test:brave_ipfs_browser_tests",
|
||||
]
|
||||
if (!is_android && !is_ios) {
|
||||
visibility += [ "//brave/components/ipfs/test:brave_ipfs_browser_tests" ]
|
||||
}
|
||||
|
||||
# Remove when https://github.com/brave/brave-browser/issues/10653 is resolved
|
||||
check_includes = false
|
||||
|
||||
@@ -44,6 +44,7 @@ source_set("ipfs") {
|
||||
"//brave/components/resources:static_resources",
|
||||
"//brave/components/resources:strings",
|
||||
"//brave/components/services/ipfs/public/mojom",
|
||||
"//brave/extensions:common",
|
||||
"//components/component_updater:component_updater",
|
||||
"//components/infobars/core",
|
||||
"//components/keyed_service/core",
|
||||
@@ -54,6 +55,7 @@ source_set("ipfs") {
|
||||
"//components/version_info",
|
||||
"//content/public/browser",
|
||||
"//content/public/common",
|
||||
"//extensions/buildflags",
|
||||
"//net",
|
||||
"//services/network/public/cpp",
|
||||
"//third_party/re2",
|
||||
@@ -63,9 +65,6 @@ source_set("ipfs") {
|
||||
]
|
||||
|
||||
if (enable_extensions) {
|
||||
deps += [
|
||||
"//extensions/browser",
|
||||
"//extensions/common",
|
||||
]
|
||||
deps += [ "//extensions/browser" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ include_rules = [
|
||||
"+content/public/browser",
|
||||
"+content/public/common",
|
||||
"+extensions/browser",
|
||||
"+extensions/buildflags",
|
||||
"+extensions/common",
|
||||
"+third_party/re2",
|
||||
"+services/network/public",
|
||||
|
||||
@@ -59,6 +59,11 @@ static const char kIpfsClientComponentBase64PublicKey[] =
|
||||
"J9HIuxTzVft5v5Ys0S0Kqorn2xo+lFpVzZT7sV2orDHaLiVB5uqCMWhXehVixfRp"
|
||||
"BuPGdwSuzJsNkV5aGOObKfoLr1zUgstJYMLB0uWNXTfuKM4EibWUMLMqlCYVzs2R"
|
||||
"ewIDAQAB";
|
||||
#elif defined(OS_ANDROID)
|
||||
// Not used yet
|
||||
static const char kIpfsClientComponentName[] = "";
|
||||
static const char kIpfsClientComponentId[] = "";
|
||||
static const char kIpfsClientComponentBase64PublicKey[] = "";
|
||||
#endif
|
||||
|
||||
class BraveIpfsClientUpdater : public BraveComponent,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import("//build/config/features.gni")
|
||||
|
||||
declare_args() {
|
||||
ipfs_enabled = is_mac || is_linux || is_win
|
||||
ipfs_enabled = !is_ios
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ IpfsNavigationThrottle::MaybeCreateThrottleFor(
|
||||
const std::string& locale) {
|
||||
if (!ipfs_service)
|
||||
return nullptr;
|
||||
|
||||
return std::make_unique<IpfsNavigationThrottle>(navigation_handle,
|
||||
ipfs_service, locale);
|
||||
}
|
||||
@@ -107,8 +106,9 @@ IpfsNavigationThrottle::WillStartRequest() {
|
||||
pref_service_->GetInteger(kIPFSResolveMethod) ==
|
||||
static_cast<int>(ipfs::IPFSResolveMethodTypes::IPFS_ASK);
|
||||
|
||||
if (IsIPFSScheme(url) && should_ask)
|
||||
if (IsIPFSScheme(url) && should_ask) {
|
||||
return ShowIPFSOnboardingInterstitial();
|
||||
}
|
||||
|
||||
if (!IsLocalGatewayURL(url)) {
|
||||
return content::NavigationThrottle::PROCEED;
|
||||
|
||||
@@ -64,7 +64,9 @@ IPFSOnboardingPage::IPFSOnboardingPage(
|
||||
std::move(controller)),
|
||||
ipfs_service_(ipfs_service) {
|
||||
service_observer_.Observe(ipfs_service_);
|
||||
#if !defined(OS_ANDROID)
|
||||
theme_observer_.Observe(ui::NativeTheme::GetInstanceForNativeUi());
|
||||
#endif
|
||||
}
|
||||
|
||||
IPFSOnboardingPage::~IPFSOnboardingPage() = default;
|
||||
@@ -250,8 +252,12 @@ void IPFSOnboardingPage::PopulateInterstitialStrings(
|
||||
load_time_data->SetString(
|
||||
"tryAgainText", l10n_util::GetStringUTF16(IDS_IPFS_ONBOARDING_TRY_AGAIN));
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
load_time_data->SetString(
|
||||
"braveTheme", GetThemeType(ui::NativeTheme::GetInstanceForNativeUi()));
|
||||
#else
|
||||
load_time_data->SetString("braveTheme", "light");
|
||||
#endif
|
||||
}
|
||||
|
||||
int IPFSOnboardingPage::GetHTMLTemplateId() {
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/user_prefs/user_prefs.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "extensions/browser/extension_registry.h"
|
||||
#endif
|
||||
|
||||
namespace ipfs {
|
||||
|
||||
@@ -20,11 +24,13 @@ constexpr size_t kP3ATimerInterval = 1;
|
||||
// IPFS companion installed?
|
||||
// i) No, ii) Yes
|
||||
void RecordIPFSCompanionInstalled(content::BrowserContext* context) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
const char ipfs_companion_extension_id[] = "nibjojkomfdiaoajekhjakgkdhaomnch";
|
||||
auto* registry = extensions::ExtensionRegistry::Get(context);
|
||||
bool installed =
|
||||
registry->enabled_extensions().Contains(ipfs_companion_extension_id);
|
||||
UMA_HISTOGRAM_BOOLEAN("Brave.IPFS.IPFSCompanionInstalled", installed);
|
||||
#endif
|
||||
}
|
||||
|
||||
int GetIPFSDetectionPromptBucket(PrefService* prefs) {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-wrapper">
|
||||
<div class="control-box">
|
||||
<div class="control-box" id="local-node-box">
|
||||
<div class="button-wrapper">
|
||||
<button class="button" id="local-node-button">
|
||||
$i18n{localNodeButton}
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer" id="footer">
|
||||
<p class="copy">
|
||||
$i18nRaw{footerText}
|
||||
<a id="open-settings"
|
||||
|
||||
@@ -27,7 +27,13 @@ const setTheme = (theme) => {
|
||||
document.body.className = `${theme.toLowerCase()}`;
|
||||
}
|
||||
|
||||
function setupEvents() {
|
||||
function setup() {
|
||||
// No local node option on Android
|
||||
if (navigator.userAgent.match(/Android/i)) {
|
||||
$('local-node-box').style.display = 'none'
|
||||
$('footer').style.display = 'none'
|
||||
}
|
||||
|
||||
$('local-node-button').addEventListener('click', function() {
|
||||
$('local-node-button').textContent = '$i18nRaw{installationText}'
|
||||
$('error-container').className = 'error-container-hidden'
|
||||
@@ -48,7 +54,7 @@ function setupEvents() {
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', setupEvents);
|
||||
document.addEventListener('DOMContentLoaded', setup);
|
||||
|
||||
function showErrorMessage(text) {
|
||||
$('error-container').textContent = text
|
||||
@@ -80,4 +86,4 @@ window.addEventListener("message", function(event) {
|
||||
if (!event.data || event.data.command != "ipfs")
|
||||
return
|
||||
handleCommand(event.data.value, event.data.text);
|
||||
}, false);
|
||||
}, false);
|
||||
|
||||
@@ -43,9 +43,10 @@ source_set("brave_ipfs_unit_tests") {
|
||||
} # if (ipfs_enabled)
|
||||
} # source_set("brave_ipfs_unit_tests")
|
||||
|
||||
# TODO(bbondy) Remove this, it doesn't belong in components
|
||||
source_set("brave_ipfs_browser_tests") {
|
||||
testonly = true
|
||||
if (ipfs_enabled) {
|
||||
if (ipfs_enabled && !is_android) {
|
||||
sources = [
|
||||
"//brave/components/ipfs/brave_ipfs_client_updater_browsertest.cc",
|
||||
"//brave/components/ipfs/ipfs_navigation_throttle_browsertest.cc",
|
||||
@@ -65,5 +66,5 @@ source_set("brave_ipfs_browser_tests") {
|
||||
"//net:test_support",
|
||||
]
|
||||
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
|
||||
} # if (ipfs_enabled)
|
||||
} # if (ipfs_enabled && !is_android)
|
||||
} # source_set("brave_ipfs_browser_tests")
|
||||
|
||||
@@ -8,6 +8,5 @@
|
||||
<include name="IDR_IPFS_INTERSTITIAL_ONBOARDING_HTML" file="../ipfs/resources/onboarding/ipfs_onboarding.html" flattenhtml="true" type="BINDATA" />
|
||||
<include name="IDR_IPFS_INTERSTITIAL_ONBOARDING_JS" file="../ipfs/resources/onboarding/ipfs_onboarding.js" type="BINDATA" />
|
||||
<include name="IDR_IPFS_INTERSTITIAL_ONBOARDING_CSS" file="../ipfs/resources/onboarding/ipfs_onboarding.css" type="BINDATA" />
|
||||
|
||||
</if>
|
||||
</grit-part>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
source_set("ipfs") {
|
||||
sources = [
|
||||
"ipfs_service_impl.cc",
|
||||
"ipfs_service_impl.h",
|
||||
]
|
||||
sources = [ "ipfs_service_impl.h" ]
|
||||
if (!is_android) {
|
||||
sources += [ "ipfs_service_impl.cc" ]
|
||||
} else {
|
||||
sources += [ "ipfs_service_impl_android.cc" ]
|
||||
}
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "brave/components/services/ipfs/ipfs_service_impl.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/threading/thread.h"
|
||||
|
||||
namespace ipfs {
|
||||
|
||||
IpfsServiceImpl::IpfsServiceImpl(
|
||||
mojo::PendingReceiver<mojom::IpfsService> receiver)
|
||||
: receiver_(this, std::move(receiver)) {
|
||||
receiver_.set_disconnect_handler(
|
||||
base::BindOnce(&IpfsServiceImpl::Cleanup, base::Unretained(this)));
|
||||
}
|
||||
|
||||
IpfsServiceImpl::~IpfsServiceImpl() {}
|
||||
|
||||
void IpfsServiceImpl::Cleanup() {}
|
||||
|
||||
void IpfsServiceImpl::Launch(mojom::IpfsConfigPtr config,
|
||||
LaunchCallback callback) {
|
||||
std::move(callback).Run(false, -1);
|
||||
}
|
||||
|
||||
void IpfsServiceImpl::MonitorChild() {}
|
||||
|
||||
void IpfsServiceImpl::Shutdown() {}
|
||||
|
||||
void IpfsServiceImpl::SetCrashHandler(SetCrashHandlerCallback callback) {}
|
||||
|
||||
} // namespace ipfs
|
||||
+3
-1
@@ -631,7 +631,6 @@ if (!is_android) {
|
||||
"//brave/browser/ui/tabs/test:browser_tests",
|
||||
"//brave/browser/widevine:browser_tests",
|
||||
"//brave/chromium_src/third_party/blink/renderer/modules:browser_tests",
|
||||
"//brave/components/ipfs/test:brave_ipfs_browser_tests",
|
||||
"//brave/renderer/test:browser_tests",
|
||||
"//components/security_interstitials/content:security_interstitial_page",
|
||||
"//media:test_support",
|
||||
@@ -641,6 +640,9 @@ if (!is_android) {
|
||||
if (decentralized_dns_enabled) {
|
||||
deps += [ "//brave/browser/decentralized_dns/test:browser_tests" ]
|
||||
}
|
||||
if (!is_android && !is_ios) {
|
||||
deps += [ "//brave/components/ipfs/test:brave_ipfs_browser_tests" ]
|
||||
}
|
||||
|
||||
if (enable_brave_perf_predictor) {
|
||||
sources += [ "//brave/components/brave_perf_predictor/browser/perf_predictor_tab_helper_browsertest.cc" ]
|
||||
|
||||
Reference in New Issue
Block a user