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

Side by Side Diff: components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "base/json/json_writer.h" 5 #include "base/json/json_writer.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/test/histogram_tester.h" 8 #include "base/test/histogram_tester.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 type = syncer::PRIORITY_PREFERENCES; 116 type = syncer::PRIORITY_PREFERENCES;
117 ASSERT_NE(syncer::UNSPECIFIED, type) << "Wrong preference name: " << name; 117 ASSERT_NE(syncer::UNSPECIFIED, type) << "Wrong preference name: " << name;
118 syncer::SyncableService* sync = prefs->GetSyncableService(type); 118 syncer::SyncableService* sync = prefs->GetSyncableService(type);
119 sync->MergeDataAndStartSyncing(type, sync_data_list, 119 sync->MergeDataAndStartSyncing(type, sync_data_list,
120 std::unique_ptr<syncer::SyncChangeProcessor>( 120 std::unique_ptr<syncer::SyncChangeProcessor>(
121 new syncer::FakeSyncChangeProcessor), 121 new syncer::FakeSyncChangeProcessor),
122 std::unique_ptr<syncer::SyncErrorFactory>( 122 std::unique_ptr<syncer::SyncErrorFactory>(
123 new syncer::SyncErrorFactoryMock)); 123 new syncer::SyncErrorFactoryMock));
124 } 124 }
125 125
126 class SyncServiceMock : public syncer::FakeSyncService { 126 class SyncServiceMock : public sync_driver::FakeSyncService {
127 public: 127 public:
128 bool IsFirstSetupComplete() const override { return true; } 128 bool IsFirstSetupComplete() const override { return true; }
129 129
130 bool CanSyncStart() const override { return can_sync_start_; } 130 bool CanSyncStart() const override { return can_sync_start_; }
131 131
132 void SetCanSyncStart(bool can_sync_start) { 132 void SetCanSyncStart(bool can_sync_start) {
133 can_sync_start_ = can_sync_start; 133 can_sync_start_ = can_sync_start;
134 } 134 }
135 135
136 private: 136 private:
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true); 453 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true);
454 profile_sync_service()->SetCanSyncStart(false); 454 profile_sync_service()->SetCanSyncStart(false);
455 base::HistogramTester tester; 455 base::HistogramTester tester;
456 NotifyProfileAdded(); 456 NotifyProfileAdded();
457 ExpectValuesForBothPrefValues(true, true); 457 ExpectValuesForBothPrefValues(true, true);
458 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName), 458 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName),
459 testing::ElementsAre(base::Bucket(I11F11, 1))); 459 testing::ElementsAre(base::Bucket(I11F11, 1)));
460 } 460 }
461 461
462 } // namespace password_manager 462 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698