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

Side by Side Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 1789433002: [Sync] Start up immediately when entering the sync setup UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setup
Patch Set: Split tests. Created 4 years, 9 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
« no previous file with comments | « no previous file | components/sync_driver/startup_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/browser_sync/browser/profile_sync_service.h" 5 #include "components/browser_sync/browser/profile_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 1473
1474 bool ProfileSyncService::IsFirstSetupInProgress() const { 1474 bool ProfileSyncService::IsFirstSetupInProgress() const {
1475 return !IsFirstSetupComplete() && startup_controller_->IsSetupInProgress(); 1475 return !IsFirstSetupComplete() && startup_controller_->IsSetupInProgress();
1476 } 1476 }
1477 1477
1478 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) { 1478 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) {
1479 // This method is a no-op if |setup_in_progress_| remains unchanged. 1479 // This method is a no-op if |setup_in_progress_| remains unchanged.
1480 if (startup_controller_->IsSetupInProgress() == setup_in_progress) 1480 if (startup_controller_->IsSetupInProgress() == setup_in_progress)
1481 return; 1481 return;
1482 1482
1483 startup_controller_->set_setup_in_progress(setup_in_progress); 1483 startup_controller_->SetSetupInProgress(setup_in_progress);
1484 if (!setup_in_progress && IsBackendInitialized()) 1484 if (!setup_in_progress && IsBackendInitialized())
1485 ReconfigureDatatypeManager(); 1485 ReconfigureDatatypeManager();
1486 NotifyObservers(); 1486 NotifyObservers();
1487 } 1487 }
1488 1488
1489 bool ProfileSyncService::IsSyncAllowed() const { 1489 bool ProfileSyncService::IsSyncAllowed() const {
1490 return IsSyncAllowedByFlag() && !IsManaged() && IsSyncAllowedByPlatform(); 1490 return IsSyncAllowedByFlag() && !IsManaged() && IsSyncAllowedByPlatform();
1491 } 1491 }
1492 1492
1493 bool ProfileSyncService::IsSyncActive() const { 1493 bool ProfileSyncService::IsSyncActive() const {
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 } 2450 }
2451 2451
2452 std::string ProfileSyncService::unrecoverable_error_message() const { 2452 std::string ProfileSyncService::unrecoverable_error_message() const {
2453 return unrecoverable_error_message_; 2453 return unrecoverable_error_message_;
2454 } 2454 }
2455 2455
2456 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() 2456 tracked_objects::Location ProfileSyncService::unrecoverable_error_location()
2457 const { 2457 const {
2458 return unrecoverable_error_location_; 2458 return unrecoverable_error_location_;
2459 } 2459 }
OLDNEW
« no previous file with comments | « no previous file | components/sync_driver/startup_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698