| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // |profile| may be NULL in unit tests. | 160 // |profile| may be NULL in unit tests. |
| 161 sync_prefs_(profile_ ? profile_->GetPrefs() : NULL), | 161 sync_prefs_(profile_ ? profile_->GetPrefs() : NULL), |
| 162 sync_service_url_(kDevServerUrl), | 162 sync_service_url_(kDevServerUrl), |
| 163 data_type_requested_sync_startup_(false), | 163 data_type_requested_sync_startup_(false), |
| 164 is_first_time_sync_configure_(false), | 164 is_first_time_sync_configure_(false), |
| 165 backend_initialized_(false), | 165 backend_initialized_(false), |
| 166 sync_disabled_by_admin_(false), | 166 sync_disabled_by_admin_(false), |
| 167 is_auth_in_progress_(false), | 167 is_auth_in_progress_(false), |
| 168 signin_(signin_manager), | 168 signin_(signin_manager), |
| 169 unrecoverable_error_reason_(ERROR_REASON_UNSET), | 169 unrecoverable_error_reason_(ERROR_REASON_UNSET), |
| 170 weak_factory_(this), | |
| 171 expect_sync_configuration_aborted_(false), | 170 expect_sync_configuration_aborted_(false), |
| 172 encrypted_types_(syncer::SyncEncryptionHandler::SensitiveTypes()), | 171 encrypted_types_(syncer::SyncEncryptionHandler::SensitiveTypes()), |
| 173 encrypt_everything_(false), | 172 encrypt_everything_(false), |
| 174 encryption_pending_(false), | 173 encryption_pending_(false), |
| 175 auto_start_enabled_(start_behavior == AUTO_START), | 174 auto_start_enabled_(start_behavior == AUTO_START), |
| 176 configure_status_(DataTypeManager::UNKNOWN), | 175 configure_status_(DataTypeManager::UNKNOWN), |
| 177 setup_in_progress_(false), | 176 setup_in_progress_(false), |
| 178 use_oauth2_token_(false), | 177 use_oauth2_token_(false), |
| 179 oauth2_token_service_(oauth2_token_service), | 178 oauth2_token_service_(oauth2_token_service), |
| 180 request_access_token_backoff_(&kRequestAccessTokenBackoffPolicy) { | 179 request_access_token_backoff_(&kRequestAccessTokenBackoffPolicy), |
| 180 weak_factory_(this) { |
| 181 // By default, dev, canary, and unbranded Chromium users will go to the | 181 // By default, dev, canary, and unbranded Chromium users will go to the |
| 182 // development servers. Development servers have more features than standard | 182 // development servers. Development servers have more features than standard |
| 183 // sync servers. Users with officially-branded Chrome stable and beta builds | 183 // sync servers. Users with officially-branded Chrome stable and beta builds |
| 184 // will go to the standard sync servers. | 184 // will go to the standard sync servers. |
| 185 // | 185 // |
| 186 // GetChannel hits the registry on Windows. See http://crbug.com/70380. | 186 // GetChannel hits the registry on Windows. See http://crbug.com/70380. |
| 187 base::ThreadRestrictions::ScopedAllowIO allow_io; | 187 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 188 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 188 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 189 if (channel == chrome::VersionInfo::CHANNEL_STABLE || | 189 if (channel == chrome::VersionInfo::CHANNEL_STABLE || |
| 190 channel == chrome::VersionInfo::CHANNEL_BETA) { | 190 channel == chrome::VersionInfo::CHANNEL_BETA) { |
| (...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 NOTREACHED(); | 2165 NOTREACHED(); |
| 2166 #endif | 2166 #endif |
| 2167 } | 2167 } |
| 2168 | 2168 |
| 2169 return signin_->GetAuthenticatedUsername(); | 2169 return signin_->GetAuthenticatedUsername(); |
| 2170 } | 2170 } |
| 2171 | 2171 |
| 2172 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() { | 2172 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() { |
| 2173 return MakeWeakHandle(sync_js_controller_.AsWeakPtr()); | 2173 return MakeWeakHandle(sync_js_controller_.AsWeakPtr()); |
| 2174 } | 2174 } |
| OLD | NEW |