OLD | NEW |
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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 sync_driver::prefs::kEnhancedBookmarksExperimentEnabled); | 1058 sync_driver::prefs::kEnhancedBookmarksExperimentEnabled); |
1059 profile_->GetPrefs()->ClearPref( | 1059 profile_->GetPrefs()->ClearPref( |
1060 sync_driver::prefs::kEnhancedBookmarksExtensionId); | 1060 sync_driver::prefs::kEnhancedBookmarksExtensionId); |
1061 } | 1061 } |
1062 } | 1062 } |
1063 BookmarksExperimentState bookmarks_experiment_state = | 1063 BookmarksExperimentState bookmarks_experiment_state = |
1064 static_cast<BookmarksExperimentState>(profile_->GetPrefs()->GetInteger( | 1064 static_cast<BookmarksExperimentState>(profile_->GetPrefs()->GetInteger( |
1065 sync_driver::prefs::kEnhancedBookmarksExperimentEnabled)); | 1065 sync_driver::prefs::kEnhancedBookmarksExperimentEnabled)); |
1066 // If bookmark experiment state was changed update about flags experiment. | 1066 // If bookmark experiment state was changed update about flags experiment. |
1067 if (bookmarks_experiment_state_before != bookmarks_experiment_state) { | 1067 if (bookmarks_experiment_state_before != bookmarks_experiment_state) { |
1068 UpdateBookmarksExperiment(g_browser_process->local_state(), | 1068 ForceFinchBookmarkExperimentIfNeeded(g_browser_process->local_state(), |
1069 bookmarks_experiment_state); | 1069 bookmarks_experiment_state); |
1070 } | 1070 } |
1071 | 1071 |
1072 // If this is a first time sync for a client, this will be called before | 1072 // If this is a first time sync for a client, this will be called before |
1073 // OnBackendInitialized() to ensure the new datatypes are available at sync | 1073 // OnBackendInitialized() to ensure the new datatypes are available at sync |
1074 // setup. As a result, the migrator won't exist yet. This is fine because for | 1074 // setup. As a result, the migrator won't exist yet. This is fine because for |
1075 // first time sync cases we're only concerned with making the datatype | 1075 // first time sync cases we're only concerned with making the datatype |
1076 // available. | 1076 // available. |
1077 if (migrator_.get() && | 1077 if (migrator_.get() && |
1078 migrator_->state() != browser_sync::BackendMigrator::IDLE) { | 1078 migrator_->state() != browser_sync::BackendMigrator::IDLE) { |
1079 DVLOG(1) << "Dropping OnExperimentsChanged due to migrator busy."; | 1079 DVLOG(1) << "Dropping OnExperimentsChanged due to migrator busy."; |
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2365 status.last_get_token_error = last_get_token_error_; | 2365 status.last_get_token_error = last_get_token_error_; |
2366 if (request_access_token_retry_timer_.IsRunning()) | 2366 if (request_access_token_retry_timer_.IsRunning()) |
2367 status.next_token_request_time = next_token_request_time_; | 2367 status.next_token_request_time = next_token_request_time_; |
2368 return status; | 2368 return status; |
2369 } | 2369 } |
2370 | 2370 |
2371 void ProfileSyncService::OverrideNetworkResourcesForTest( | 2371 void ProfileSyncService::OverrideNetworkResourcesForTest( |
2372 scoped_ptr<syncer::NetworkResources> network_resources) { | 2372 scoped_ptr<syncer::NetworkResources> network_resources) { |
2373 network_resources_ = network_resources.Pass(); | 2373 network_resources_ = network_resources.Pass(); |
2374 } | 2374 } |
OLD | NEW |