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

Side by Side Diff: chrome/browser/sync/test/integration/p2p_sync_refresher.cc

Issue 1419103009: [Sync] Componentize ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@max_bogue_sync_backend_host
Patch Set: Rebase Created 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/integration/p2p_sync_refresher.h" 5 #include "chrome/browser/sync/test/integration/p2p_sync_refresher.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/sync/profile_sync_service.h"
9 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" 8 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
10 #include "chrome/browser/sync/test/integration/sync_test.h" 9 #include "chrome/browser/sync/test/integration/sync_test.h"
10 #include "components/browser_sync/browser/profile_sync_service.h"
11 #include "content/public/browser/notification_service.h" 11 #include "content/public/browser/notification_service.h"
12 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" 12 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
13 13
14 P2PSyncRefresher::P2PSyncRefresher(Profile* profile, 14 P2PSyncRefresher::P2PSyncRefresher(Profile* profile,
15 ProfileSyncService* sync_service) 15 ProfileSyncService* sync_service)
16 : profile_(profile), sync_service_(sync_service) { 16 : profile_(profile), sync_service_(sync_service) {
17 sync_service_->AddObserver(this); 17 sync_service_->AddObserver(this);
18 } 18 }
19 19
20 P2PSyncRefresher::~P2PSyncRefresher() { 20 P2PSyncRefresher::~P2PSyncRefresher() {
(...skipping 10 matching lines...) Expand all
31 if (is_notifiable_commit) { 31 if (is_notifiable_commit) {
32 syncer::ModelTypeSet model_types = 32 syncer::ModelTypeSet model_types =
33 snap.model_neutral_state().commit_request_types; 33 snap.model_neutral_state().commit_request_types;
34 SyncTest* test = sync_datatype_helper::test(); 34 SyncTest* test = sync_datatype_helper::test();
35 for (int i = 0; i < test->num_clients(); ++i) { 35 for (int i = 0; i < test->num_clients(); ++i) {
36 if (profile_ != test->GetProfile(i)) 36 if (profile_ != test->GetProfile(i))
37 test->TriggerSyncForModelTypes(i, model_types); 37 test->TriggerSyncForModelTypes(i, model_types);
38 } 38 }
39 } 39 }
40 } 40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698