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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 9456031: Remove PSS::ShowLoginDialog() and obsolete IDC_SYNC_BOOKMARKS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 break; 966 break;
967 case browser_sync::DISABLE_SYNC_ON_CLIENT: 967 case browser_sync::DISABLE_SYNC_ON_CLIENT:
968 OnStopSyncingPermanently(); 968 OnStopSyncingPermanently();
969 break; 969 break;
970 default: 970 default:
971 NOTREACHED(); 971 NOTREACHED();
972 } 972 }
973 NotifyObservers(); 973 NotifyObservers();
974 } 974 }
975 975
976 void ProfileSyncService::ShowLoginDialog() {
977 // TODO(atwilson): Remove this API and have the callers directly call
978 // LoginUIService.
979 LoginUIServiceFactory::GetForProfile(profile_)->ShowLoginUI();
980 }
981
982 void ProfileSyncService::ShowErrorUI() { 976 void ProfileSyncService::ShowErrorUI() {
983 if (WizardIsVisible()) { 977 if (WizardIsVisible()) {
984 wizard_.Focus(); 978 wizard_.Focus();
985 return; 979 return;
986 } 980 }
987 981
988 // Figure out what kind of error we've encountered. There are only 3 kinds: 982 // Figure out what kind of error we've encountered. There are only 3 kinds:
989 // 1) auth error. 983 // 1) auth error.
990 // 2) server-initiated error 984 // 2) server-initiated error
991 // 3) passphrase error 985 // 3) passphrase error
992 // Any other errors (such as unrecoverable error) should be handled by the UI 986 // Any other errors (such as unrecoverable error) should be handled by the UI
993 // itself and should not result in a call to ShowErrorUI. 987 // itself and should not result in a call to ShowErrorUI.
994 if (last_auth_error_.state() != AuthError::NONE) { 988 if (last_auth_error_.state() != AuthError::NONE) {
995 ShowLoginDialog(); 989 LoginUIServiceFactory::GetForProfile(profile_)->ShowLoginUI();
996 } else if (ShouldShowActionOnUI(last_actionable_error_)) { 990 } else if (ShouldShowActionOnUI(last_actionable_error_)) {
997 ShowSyncSetup(chrome::kPersonalOptionsSubPage); 991 ShowSyncSetup(chrome::kPersonalOptionsSubPage);
998 } else { 992 } else {
999 // We should only get here for passphrase error. 993 // We should only get here for passphrase error.
1000 DCHECK(IsPassphraseRequired()); 994 DCHECK(IsPassphraseRequired());
1001 ShowSyncSetupWithWizard(SyncSetupWizard::ENTER_PASSPHRASE); 995 ShowSyncSetupWithWizard(SyncSetupWizard::ENTER_PASSPHRASE);
1002 } 996 }
1003 } 997 }
1004 998
1005 void ProfileSyncService::ShowConfigure(bool sync_everything) { 999 void ProfileSyncService::ShowConfigure(bool sync_everything) {
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 << "Unrecoverable error."; 1637 << "Unrecoverable error.";
1644 } else { 1638 } else {
1645 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " 1639 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not "
1646 << "initialized"; 1640 << "initialized";
1647 } 1641 }
1648 } 1642 }
1649 1643
1650 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { 1644 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() {
1651 return failed_datatypes_handler_; 1645 return failed_datatypes_handler_;
1652 } 1646 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698