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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc

Issue 1100223002: Update {virtual,override} to follow C++11 style in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/glue/sync_backend_host_impl.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 FakeSyncManager** fake_manager_; 144 FakeSyncManager** fake_manager_;
145 }; 145 };
146 146
147 class SyncBackendHostTest : public testing::Test { 147 class SyncBackendHostTest : public testing::Test {
148 protected: 148 protected:
149 SyncBackendHostTest() 149 SyncBackendHostTest()
150 : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD), 150 : thread_bundle_(content::TestBrowserThreadBundle::REAL_IO_THREAD),
151 profile_manager_(TestingBrowserProcess::GetGlobal()), 151 profile_manager_(TestingBrowserProcess::GetGlobal()),
152 fake_manager_(NULL) {} 152 fake_manager_(NULL) {}
153 153
154 virtual ~SyncBackendHostTest() {} 154 ~SyncBackendHostTest() override {}
155 155
156 virtual void SetUp() override { 156 void SetUp() override {
157 ASSERT_TRUE(profile_manager_.SetUp()); 157 ASSERT_TRUE(profile_manager_.SetUp());
158 profile_ = profile_manager_.CreateTestingProfile(kTestProfileName); 158 profile_ = profile_manager_.CreateTestingProfile(kTestProfileName);
159 sync_prefs_.reset(new sync_driver::SyncPrefs(profile_->GetPrefs())); 159 sync_prefs_.reset(new sync_driver::SyncPrefs(profile_->GetPrefs()));
160 backend_.reset(new SyncBackendHostImpl( 160 backend_.reset(new SyncBackendHostImpl(
161 profile_->GetDebugName(), 161 profile_->GetDebugName(),
162 profile_, 162 profile_,
163 invalidation::ProfileInvalidationProviderFactory::GetForProfile( 163 invalidation::ProfileInvalidationProviderFactory::GetForProfile(
164 profile_)->GetInvalidationService(), 164 profile_)->GetInvalidationService(),
165 sync_prefs_->AsWeakPtr(), 165 sync_prefs_->AsWeakPtr(),
166 base::FilePath(kTestSyncDir))); 166 base::FilePath(kTestSyncDir)));
(...skipping 10 matching lines...) Expand all
177 // Registrar removing them if it can't find their model workers. 177 // Registrar removing them if it can't find their model workers.
178 enabled_types_.Put(syncer::BOOKMARKS); 178 enabled_types_.Put(syncer::BOOKMARKS);
179 enabled_types_.Put(syncer::PREFERENCES); 179 enabled_types_.Put(syncer::PREFERENCES);
180 enabled_types_.Put(syncer::SESSIONS); 180 enabled_types_.Put(syncer::SESSIONS);
181 enabled_types_.Put(syncer::SEARCH_ENGINES); 181 enabled_types_.Put(syncer::SEARCH_ENGINES);
182 enabled_types_.Put(syncer::AUTOFILL); 182 enabled_types_.Put(syncer::AUTOFILL);
183 183
184 network_resources_.reset(new syncer::HttpBridgeNetworkResources()); 184 network_resources_.reset(new syncer::HttpBridgeNetworkResources());
185 } 185 }
186 186
187 virtual void TearDown() override { 187 void TearDown() override {
188 if (backend_) { 188 if (backend_) {
189 backend_->StopSyncingForShutdown(); 189 backend_->StopSyncingForShutdown();
190 backend_->Shutdown(syncer::STOP_SYNC); 190 backend_->Shutdown(syncer::STOP_SYNC);
191 } 191 }
192 backend_.reset(); 192 backend_.reset();
193 sync_prefs_.reset(); 193 sync_prefs_.reset();
194 profile_ = NULL; 194 profile_ = NULL;
195 profile_manager_.DeleteTestingProfile(kTestProfileName); 195 profile_manager_.DeleteTestingProfile(kTestProfileName);
196 // Pump messages posted by the sync thread (which may end up 196 // Pump messages posted by the sync thread (which may end up
197 // posting on the IO thread). 197 // posting on the IO thread).
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 syncer::ModelTypeSet()); 788 syncer::ModelTypeSet());
789 EXPECT_TRUE( 789 EXPECT_TRUE(
790 ready_types.Equals(syncer::Difference(enabled_types_, error_types))); 790 ready_types.Equals(syncer::Difference(enabled_types_, error_types)));
791 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken( 791 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken(
792 error_types).Empty()); 792 error_types).Empty());
793 } 793 }
794 794
795 } // namespace 795 } // namespace
796 796
797 } // namespace browser_sync 797 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_win.cc ('k') | chrome/browser/sync/profile_sync_components_factory_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698