summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/sync_ui_util.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 07:45:59 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 07:45:59 +0000
commitd3b98c88fa50c3b6bf4644570220cf93f8ca9bea (patch)
treee2fdf54cee2d8546526ed9aca724e9f957d0fb2b /chrome/browser/sync/sync_ui_util.cc
parent9473a8d2db6780ecac153c65ba8200cdb0eeb1bd (diff)
downloadchromium_src-d3b98c88fa50c3b6bf4644570220cf93f8ca9bea.zip
chromium_src-d3b98c88fa50c3b6bf4644570220cf93f8ca9bea.tar.gz
chromium_src-d3b98c88fa50c3b6bf4644570220cf93f8ca9bea.tar.bz2
Implement support for disabling sync through configuration management.
BUG=45316 TEST=Configure SyncDisabled policy and check the UI. Review URL: http://codereview.chromium.org/2905003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/sync_ui_util.cc')
-rw-r--r--chrome/browser/sync/sync_ui_util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index df28f40..ce8e4f9 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;
}