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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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 "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 <vector> 9 #include <vector>
10 10
(...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 } 2431 }
2432 helper->OnReceivedNodesForTypes(type_vector, empty_results.Pass()); 2432 helper->OnReceivedNodesForTypes(type_vector, empty_results.Pass());
2433 } else { 2433 } else {
2434 backend_->GetAllNodesForTypes( 2434 backend_->GetAllNodesForTypes(
2435 directory_types, 2435 directory_types,
2436 base::Bind(&GetAllNodesRequestHelper::OnReceivedNodesForTypes, helper)); 2436 base::Bind(&GetAllNodesRequestHelper::OnReceivedNodesForTypes, helper));
2437 } 2437 }
2438 } 2438 }
2439 2439
2440 bool ProfileSyncService::HasObserver( 2440 bool ProfileSyncService::HasObserver(
2441 ProfileSyncServiceBase::Observer* observer) const { 2441 const ProfileSyncServiceBase::Observer* observer) const {
2442 return observers_.HasObserver(observer); 2442 return observers_.HasObserver(observer);
2443 } 2443 }
2444 2444
2445 base::WeakPtr<syncer::JsController> ProfileSyncService::GetJsController() { 2445 base::WeakPtr<syncer::JsController> ProfileSyncService::GetJsController() {
2446 return sync_js_controller_.AsWeakPtr(); 2446 return sync_js_controller_.AsWeakPtr();
2447 } 2447 }
2448 2448
2449 void ProfileSyncService::SyncEvent(SyncEventCodes code) { 2449 void ProfileSyncService::SyncEvent(SyncEventCodes code) {
2450 UMA_HISTOGRAM_ENUMERATION("Sync.EventCodes", code, MAX_SYNC_EVENT_CODE); 2450 UMA_HISTOGRAM_ENUMERATION("Sync.EventCodes", code, MAX_SYNC_EVENT_CODE);
2451 } 2451 }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const { 2729 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const {
2730 return device_info_sync_service_->GetLocalDeviceBackupTime(); 2730 return device_info_sync_service_->GetLocalDeviceBackupTime();
2731 } 2731 }
2732 2732
2733 void ProfileSyncService::FlushDirectory() const { 2733 void ProfileSyncService::FlushDirectory() const {
2734 // backend_initialized_ implies backend_ isn't NULL and the manager exists. 2734 // backend_initialized_ implies backend_ isn't NULL and the manager exists.
2735 // If sync is not initialized yet, we fail silently. 2735 // If sync is not initialized yet, we fail silently.
2736 if (backend_initialized_) 2736 if (backend_initialized_)
2737 backend_->FlushDirectory(); 2737 backend_->FlushDirectory();
2738 } 2738 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698