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

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

Issue 2958303002: [Sync] Maintain a global_id mapping to update UserEvents that references navigations (Closed)
Patch Set: Rebase Created 3 years, 5 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
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/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 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 } else { 2126 } else {
2127 // Control Types 2127 // Control Types
2128 helper->OnReceivedNodesForType( 2128 helper->OnReceivedNodesForType(
2129 it.Get(), 2129 it.Get(),
2130 syncer::DirectoryDataTypeController::GetAllNodesForTypeFromDirectory( 2130 syncer::DirectoryDataTypeController::GetAllNodesForTypeFromDirectory(
2131 it.Get(), GetUserShare()->directory.get())); 2131 it.Get(), GetUserShare()->directory.get()));
2132 } 2132 }
2133 } 2133 }
2134 } 2134 }
2135 2135
2136 syncer::GlobalIdMapper* ProfileSyncService::GetGlobalIdMapper() const {
2137 return sessions_sync_manager_.get();
2138 }
2139
2136 base::WeakPtr<syncer::JsController> ProfileSyncService::GetJsController() { 2140 base::WeakPtr<syncer::JsController> ProfileSyncService::GetJsController() {
2137 DCHECK(thread_checker_.CalledOnValidThread()); 2141 DCHECK(thread_checker_.CalledOnValidThread());
2138 return sync_js_controller_.AsWeakPtr(); 2142 return sync_js_controller_.AsWeakPtr();
2139 } 2143 }
2140 2144
2141 // static 2145 // static
2142 void ProfileSyncService::SyncEvent(SyncEventCodes code) { 2146 void ProfileSyncService::SyncEvent(SyncEventCodes code) {
2143 UMA_HISTOGRAM_ENUMERATION("Sync.EventCodes", code, MAX_SYNC_EVENT_CODE); 2147 UMA_HISTOGRAM_ENUMERATION("Sync.EventCodes", code, MAX_SYNC_EVENT_CODE);
2144 } 2148 }
2145 2149
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 return; 2404 return;
2401 2405
2402 DCHECK(startup_controller_->IsSetupInProgress()); 2406 DCHECK(startup_controller_->IsSetupInProgress());
2403 startup_controller_->SetSetupInProgress(false); 2407 startup_controller_->SetSetupInProgress(false);
2404 2408
2405 if (IsEngineInitialized()) 2409 if (IsEngineInitialized())
2406 ReconfigureDatatypeManager(); 2410 ReconfigureDatatypeManager();
2407 NotifyObservers(); 2411 NotifyObservers();
2408 } 2412 }
2409 } // namespace browser_sync 2413 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698