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

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

Issue 6293010: Change all the places where the multi-purpose sync error link is surfaced to ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 base::TimeTicks::Now() - auth_error_time_); 719 base::TimeTicks::Now() - auth_error_time_);
720 auth_error_time_ = base::TimeTicks(); // Reset auth_error_time_ to null. 720 auth_error_time_ = base::TimeTicks(); // Reset auth_error_time_ to null.
721 } 721 }
722 722
723 wizard_.SetParent(parent_window); 723 wizard_.SetParent(parent_window);
724 wizard_.Step(SyncSetupWizard::GAIA_LOGIN); 724 wizard_.Step(SyncSetupWizard::GAIA_LOGIN);
725 725
726 FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged()); 726 FOR_EACH_OBSERVER(Observer, observers_, OnStateChanged());
727 } 727 }
728 728
729 void ProfileSyncService::ShowErrorUI(gfx::NativeWindow parent_window) {
730 if (observed_passphrase_required()) {
731 if (IsUsingSecondaryPassphrase())
732 PromptForExistingPassphrase(parent_window);
733 else
734 ShowLoginDialog(parent_window);
735 return;
736 }
737 const GoogleServiceAuthError& error = GetAuthError();
738 if (error.state() == GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS ||
739 error.state() == GoogleServiceAuthError::CAPTCHA_REQUIRED ||
740 error.state() == GoogleServiceAuthError::ACCOUNT_DELETED ||
741 error.state() == GoogleServiceAuthError::ACCOUNT_DISABLED ||
742 error.state() == GoogleServiceAuthError::SERVICE_UNAVAILABLE) {
tim (not reviewing) 2011/01/19 21:34:29 nit - extra space after ==
743 ShowLoginDialog(parent_window);
744 }
745 }
746
747
729 void ProfileSyncService::ShowConfigure(gfx::NativeWindow parent_window) { 748 void ProfileSyncService::ShowConfigure(gfx::NativeWindow parent_window) {
730 if (WizardIsVisible()) { 749 if (WizardIsVisible()) {
731 wizard_.Focus(); 750 wizard_.Focus();
732 return; 751 return;
733 } 752 }
734 wizard_.SetParent(parent_window); 753 wizard_.SetParent(parent_window);
735 wizard_.Step(SyncSetupWizard::CONFIGURE); 754 wizard_.Step(SyncSetupWizard::CONFIGURE);
736 } 755 }
737 756
738 void ProfileSyncService::PromptForExistingPassphrase( 757 void ProfileSyncService::PromptForExistingPassphrase(
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 // is initialized, all enabled data types are consistent with one 1242 // is initialized, all enabled data types are consistent with one
1224 // another, and no unrecoverable error has transpired. 1243 // another, and no unrecoverable error has transpired.
1225 if (unrecoverable_error_detected_) 1244 if (unrecoverable_error_detected_)
1226 return false; 1245 return false;
1227 1246
1228 if (!data_type_manager_.get()) 1247 if (!data_type_manager_.get())
1229 return false; 1248 return false;
1230 1249
1231 return data_type_manager_->state() == DataTypeManager::CONFIGURED; 1250 return data_type_manager_->state() == DataTypeManager::CONFIGURED;
1232 } 1251 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/ui/cocoa/options/preferences_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698