| 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 "components/browser_sync/profile_sync_service.h" | 5 #include "components/browser_sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2155 } else { | 2155 } else { |
| 2156 // Control Types | 2156 // Control Types |
| 2157 helper->OnReceivedNodesForType( | 2157 helper->OnReceivedNodesForType( |
| 2158 it.Get(), | 2158 it.Get(), |
| 2159 syncer::DirectoryDataTypeController::GetAllNodesForTypeFromDirectory( | 2159 syncer::DirectoryDataTypeController::GetAllNodesForTypeFromDirectory( |
| 2160 it.Get(), GetUserShare()->directory.get())); | 2160 it.Get(), GetUserShare()->directory.get())); |
| 2161 } | 2161 } |
| 2162 } | 2162 } |
| 2163 } | 2163 } |
| 2164 | 2164 |
| 2165 syncer::GlobalIdMapper* ProfileSyncService::GetGlobalIdMapper() const { |
| 2166 return sessions_sync_manager_.get(); |
| 2167 } |
| 2168 |
| 2165 base::WeakPtr<syncer::JsController> ProfileSyncService::GetJsController() { | 2169 base::WeakPtr<syncer::JsController> ProfileSyncService::GetJsController() { |
| 2166 DCHECK(thread_checker_.CalledOnValidThread()); | 2170 DCHECK(thread_checker_.CalledOnValidThread()); |
| 2167 return sync_js_controller_.AsWeakPtr(); | 2171 return sync_js_controller_.AsWeakPtr(); |
| 2168 } | 2172 } |
| 2169 | 2173 |
| 2170 // static | 2174 // static |
| 2171 void ProfileSyncService::SyncEvent(SyncEventCodes code) { | 2175 void ProfileSyncService::SyncEvent(SyncEventCodes code) { |
| 2172 UMA_HISTOGRAM_ENUMERATION("Sync.EventCodes", code, MAX_SYNC_EVENT_CODE); | 2176 UMA_HISTOGRAM_ENUMERATION("Sync.EventCodes", code, MAX_SYNC_EVENT_CODE); |
| 2173 } | 2177 } |
| 2174 | 2178 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2429 return; | 2433 return; |
| 2430 | 2434 |
| 2431 DCHECK(startup_controller_->IsSetupInProgress()); | 2435 DCHECK(startup_controller_->IsSetupInProgress()); |
| 2432 startup_controller_->SetSetupInProgress(false); | 2436 startup_controller_->SetSetupInProgress(false); |
| 2433 | 2437 |
| 2434 if (IsEngineInitialized()) | 2438 if (IsEngineInitialized()) |
| 2435 ReconfigureDatatypeManager(); | 2439 ReconfigureDatatypeManager(); |
| 2436 NotifyObservers(); | 2440 NotifyObservers(); |
| 2437 } | 2441 } |
| 2438 } // namespace browser_sync | 2442 } // namespace browser_sync |
| OLD | NEW |