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

Unified Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 2551023006: [Sync] SyncEngine 1.5: Fix all backend references in PSS. (Closed)
Patch Set: Fix Android. Created 4 years 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/ui/webui/settings/people_handler.cc
diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
index 317f7d438635070e6b5ebc5f0e164b16fb69408e..642b7c8ee54d78c273b51efd755a72dc77ff204b 100644
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -315,11 +315,11 @@ void PeopleHandler::DisplaySpinner() {
configuring_sync_ = true;
const int kTimeoutSec = 30;
- DCHECK(!backend_start_timer_);
- backend_start_timer_.reset(new base::OneShotTimer());
- backend_start_timer_->Start(FROM_HERE,
- base::TimeDelta::FromSeconds(kTimeoutSec), this,
- &PeopleHandler::DisplayTimeout);
+ DCHECK(!engine_start_timer_);
+ engine_start_timer_.reset(new base::OneShotTimer());
+ engine_start_timer_->Start(FROM_HERE,
+ base::TimeDelta::FromSeconds(kTimeoutSec), this,
+ &PeopleHandler::DisplayTimeout);
CallJavascriptFunction("cr.webUIListenerCallback",
base::StringValue("page-status-changed"),
@@ -330,7 +330,7 @@ void PeopleHandler::DisplaySpinner() {
// http://crbug.com/128692
void PeopleHandler::DisplayTimeout() {
// Stop a timer to handle timeout in waiting for checking network connection.
- backend_start_timer_.reset();
+ engine_start_timer_.reset();
// Do not listen to sync startup events.
sync_startup_tracker_.reset();
@@ -347,7 +347,7 @@ void PeopleHandler::OnDidClosePage(const base::ListValue* args) {
void PeopleHandler::SyncStartupFailed() {
// Stop a timer to handle timeout in waiting for checking network connection.
- backend_start_timer_.reset();
+ engine_start_timer_.reset();
// Just close the sync overlay (the idea is that the base settings page will
// display the current error.)
@@ -356,10 +356,10 @@ void PeopleHandler::SyncStartupFailed() {
void PeopleHandler::SyncStartupCompleted() {
ProfileSyncService* service = GetSyncService();
- DCHECK(service->IsBackendInitialized());
+ DCHECK(service->IsEngineInitialized());
// Stop a timer to handle timeout in waiting for checking network connection.
- backend_start_timer_.reset();
+ engine_start_timer_.reset();
sync_startup_tracker_.reset();
@@ -389,7 +389,7 @@ void PeopleHandler::HandleSetDatatypes(const base::ListValue* args) {
// If the sync engine has shutdown for some reason, just close the sync
// dialog.
- if (!service || !service->IsBackendInitialized()) {
+ if (!service || !service->IsEngineInitialized()) {
CloseSyncSetup();
ResolveJavascriptCallback(*callback_id, base::StringValue(kDonePageStatus));
return;
@@ -420,7 +420,7 @@ void PeopleHandler::HandleSetEncryption(const base::ListValue* args) {
// If the sync engine has shutdown for some reason, just close the sync
// dialog.
- if (!service || !service->IsBackendInitialized()) {
+ if (!service || !service->IsEngineInitialized()) {
CloseSyncSetup();
ResolveJavascriptCallback(*callback_id, base::StringValue(kDonePageStatus));
return;
@@ -434,7 +434,7 @@ void PeopleHandler::HandleSetEncryption(const base::ListValue* args) {
// Note: Data encryption will not occur until configuration is complete
// (when the PSS receives its CONFIGURE_DONE notification from the sync
- // backend), so the user still has a chance to cancel out of the operation
+ // engine), so the user still has a chance to cancel out of the operation
// if (for example) some kind of passphrase error is encountered.
if (configuration.encrypt_all)
service->EnableEncryptEverything();
@@ -568,7 +568,7 @@ void PeopleHandler::HandleManageOtherPeople(const base::ListValue* /* args */) {
void PeopleHandler::CloseSyncSetup() {
// Stop a timer to handle timeout in waiting for checking network connection.
- backend_start_timer_.reset();
+ engine_start_timer_.reset();
// Clear the sync startup tracker, since the setup wizard is being closed.
sync_startup_tracker_.reset();
@@ -590,7 +590,7 @@ void PeopleHandler::CloseSyncSetup() {
ProfileSyncService::CANCEL_DURING_CONFIGURE);
// If the user clicked "Cancel" while setting up sync, disable sync
- // because we don't want the sync backend to remain in the
+ // because we don't want the sync engine to remain in the
// first-setup-incomplete state.
// Note: In order to disable sync across restarts on Chrome OS,
// we must call RequestStop(CLEAR_DATA), which suppresses sync startup
@@ -779,10 +779,10 @@ void PeopleHandler::PushSyncPrefs() {
ProfileSyncService* service = GetSyncService();
DCHECK(service);
- if (!service->IsBackendInitialized()) {
+ if (!service->IsEngineInitialized()) {
service->RequestStart();
- // See if it's even possible to bring up the sync backend - if not
+ // See if it's even possible to bring up the sync engine - if not
// (unrecoverable error?), don't bother displaying a spinner that will be
// immediately closed because this leads to some ugly infinite UI loop (see
// http://crbug.com/244769).
@@ -797,8 +797,8 @@ void PeopleHandler::PushSyncPrefs() {
}
configuring_sync_ = true;
- DCHECK(service->IsBackendInitialized())
- << "Cannot configure sync until the sync backend is initialized";
+ DCHECK(service->IsEngineInitialized())
+ << "Cannot configure sync until the sync engine is initialized";
// Setup args for the sync configure screen:
// syncAllDataTypes: true if the user wants to sync everything
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.h ('k') | chrome/browser/ui/webui/settings/people_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698