Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3514)

Unified Diff: chrome/browser/sync/sync_ui_util.cc

Issue 2905003: Implement support for disabling sync through configuration management. (Closed)
Patch Set: Fix PrefsControllerTest on MAC. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sync_ui_util.cc
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index df28f40b6f3bc685e6f27de387b6b825c0562ef0..ce8e4f9cf09a1753b3e4d1775f9c567b7ef62a78 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -163,7 +163,7 @@ MessageType GetStatus(ProfileSyncService* service) {
}
bool ShouldShowSyncErrorButton(ProfileSyncService* service) {
- return service && service->HasSyncSetupCompleted() &&
+ return service && !service->IsManaged() && service->HasSyncSetupCompleted() &&
(GetStatus(service) == sync_ui_util::SYNC_ERROR);
}
@@ -182,7 +182,7 @@ void OpenSyncMyBookmarksDialog(
Profile* profile, ProfileSyncService::SyncEventCodes code) {
ProfileSyncService* service =
profile->GetOriginalProfile()->GetProfileSyncService();
- if (!service) {
+ if (!service || !service->IsSyncEnabled()) {
LOG(DFATAL) << "OpenSyncMyBookmarksDialog called with sync disabled";
return;
}
« no previous file with comments | « chrome/browser/sync/profile_sync_service_startup_unittest.cc ('k') | chrome/browser/views/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698