Skip to content

Commit

Permalink
Uplift of #4536 (squashed) to release
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Feb 8, 2020
1 parent 7fdb188 commit e2d90c7
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 82 deletions.
2 changes: 1 addition & 1 deletion browser/profiles/brave_bookmark_model_loaded_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void BraveBookmarkModelLoadedObserver::BookmarkModelLoaded(
ProfileSyncServiceFactory::GetForProfile(profile_));
// When sync is enabled, we need to send migration records to other devices so
// it is handled in BraveProfileSyncServiceImpl::OnSyncReady
if (!brave_profile_service->IsBraveSyncEnabled())
if (brave_profile_service && !brave_profile_service->IsBraveSyncEnabled())
BraveMigrateOtherNode(model);
#else
BraveMigrateOtherNode(model);
Expand Down
2 changes: 1 addition & 1 deletion browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ source_set("ui") {
"//brave/components/brave_sync",
"//brave/components/brave_sync:generated_resources",
"//brave/components/brave_sync:static_resources",
"//brave/components/brave_sync:switches",
"//components/sync/driver:driver",
]
}

Expand Down
4 changes: 2 additions & 2 deletions browser/ui/brave_browser_command_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "components/prefs/pref_service.h"

#if BUILDFLAG(ENABLE_BRAVE_SYNC)
#include "brave/components/brave_sync/switches.h"
#include "components/sync/driver/sync_driver_switches.h"
#endif

namespace {
Expand Down Expand Up @@ -114,7 +114,7 @@ void BraveBrowserCommandController::InitBraveCommandState() {
UpdateCommandForBraveWallet();
#endif
#if BUILDFLAG(ENABLE_BRAVE_SYNC)
if (brave_sync::switches::IsBraveSyncAllowedByFlag())
if (switches::IsSyncAllowedByFlag())
UpdateCommandForBraveSync();
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions browser/ui/webui/brave_settings_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "content/public/browser/web_ui_data_source.h"

#if BUILDFLAG(ENABLE_BRAVE_SYNC)
#include "brave/components/brave_sync/switches.h"
#include "components/sync/driver/sync_driver_switches.h"
#endif

#if BUILDFLAG(ENABLE_SPARKLE)
Expand Down Expand Up @@ -56,7 +56,7 @@ void BraveSettingsUI::AddResources(content::WebUIDataSource* html_source,

#if BUILDFLAG(ENABLE_BRAVE_SYNC)
html_source->AddBoolean("isSyncDisabled",
!brave_sync::switches::IsBraveSyncAllowedByFlag());
!switches::IsSyncAllowedByFlag());
#else
html_source->AddBoolean("isSyncDisabled", true);
#endif
Expand Down
6 changes: 3 additions & 3 deletions browser/ui/webui/brave_web_ui_controller_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#if BUILDFLAG(ENABLE_BRAVE_SYNC)
#include "brave/browser/ui/webui/sync/sync_ui.h"
#include "brave/components/brave_sync/switches.h"
#include "components/sync/driver/sync_driver_switches.h"
#endif

using content::WebUI;
Expand Down Expand Up @@ -70,7 +70,7 @@ WebUIController* NewWebUI<BasicUI>(WebUI* web_ui, const GURL& url) {
#endif // BUILDFLAG(BRAVE_WALLET_ENABLED)
#if BUILDFLAG(ENABLE_BRAVE_SYNC)
} else if (host == kBraveUISyncHost &&
brave_sync::switches::IsBraveSyncAllowedByFlag()) {
switches::IsSyncAllowedByFlag()) {
return new SyncUI(web_ui, url.host());
#endif // BUILDFLAG(ENABLE_BRAVE_SYNC)
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
Expand Down Expand Up @@ -114,7 +114,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
url.host_piece() == chrome::kChromeUIWelcomeURL ||
#if BUILDFLAG(ENABLE_BRAVE_SYNC)
(url.host_piece() == kBraveUISyncHost &&
brave_sync::switches::IsBraveSyncAllowedByFlag()) ||
switches::IsSyncAllowedByFlag()) ||
#endif
url.host_piece() == chrome::kChromeUINewTabHost ||
url.host_piece() == chrome::kChromeUISettingsHost) {
Expand Down
19 changes: 0 additions & 19 deletions chromium_src/components/sync/driver/sync_driver_switches.cc

This file was deleted.

12 changes: 0 additions & 12 deletions components/brave_sync/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,6 @@ source_set("prefs") {
]
}

source_set("switches") {
sources = [
"switches.cc",
"switches.h",
]

deps = [
"//base",
]
}

source_set("crypto") {
sources = [
"crypto/crypto.cc",
Expand Down Expand Up @@ -132,7 +121,6 @@ source_set("core") {
":crypto",
":jslib_messages",
":prefs",
":switches",
"//base",
"//components/bookmarks/browser",
"//crypto",
Expand Down
21 changes: 0 additions & 21 deletions components/brave_sync/switches.cc

This file was deleted.

21 changes: 0 additions & 21 deletions components/brave_sync/switches.h

This file was deleted.

0 comments on commit e2d90c7

Please sign in to comment.