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

Side by Side Diff: components/sync_driver/ui_data_type_controller_unittest.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « components/sync_driver/sync_prefs_unittest.cc ('k') | components/timers/alarm_timer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/sync_driver/ui_data_type_controller.h" 5 #include "components/sync_driver/ui_data_type_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/tracked_objects.h" 10 #include "base/tracked_objects.h"
(...skipping 15 matching lines...) Expand all
26 // test the basic functionality of all UIDataTypeControllers. We'll need to have 26 // test the basic functionality of all UIDataTypeControllers. We'll need to have
27 // intelligent default values for the methods queried in the dependent services 27 // intelligent default values for the methods queried in the dependent services
28 // (e.g. those queried in StartModels). 28 // (e.g. those queried in StartModels).
29 class SyncUIDataTypeControllerTest : public testing::Test, 29 class SyncUIDataTypeControllerTest : public testing::Test,
30 public SyncApiComponentFactory { 30 public SyncApiComponentFactory {
31 public: 31 public:
32 SyncUIDataTypeControllerTest() 32 SyncUIDataTypeControllerTest()
33 : type_(syncer::PREFERENCES), 33 : type_(syncer::PREFERENCES),
34 change_processor_(NULL) {} 34 change_processor_(NULL) {}
35 35
36 virtual void SetUp() { 36 void SetUp() override {
37 preference_dtc_ = 37 preference_dtc_ =
38 new UIDataTypeController( 38 new UIDataTypeController(
39 base::MessageLoopProxy::current(), 39 base::MessageLoopProxy::current(),
40 base::Closure(), 40 base::Closure(),
41 type_, 41 type_,
42 this); 42 this);
43 SetStartExpectations(); 43 SetStartExpectations();
44 } 44 }
45 45
46 virtual void TearDown() { 46 void TearDown() override {
47 // Must be done before we pump the loop. 47 // Must be done before we pump the loop.
48 syncable_service_.StopSyncing(type_); 48 syncable_service_.StopSyncing(type_);
49 preference_dtc_ = NULL; 49 preference_dtc_ = NULL;
50 PumpLoop(); 50 PumpLoop();
51 } 51 }
52 52
53 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 53 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
54 syncer::ModelType type) override { 54 syncer::ModelType type) override {
55 return syncable_service_.AsWeakPtr(); 55 return syncable_service_.AsWeakPtr();
56 } 56 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 EXPECT_CALL(model_load_callback_, Run(_, _)); 191 EXPECT_CALL(model_load_callback_, Run(_, _));
192 syncer::SyncError error(FROM_HERE, 192 syncer::SyncError error(FROM_HERE,
193 syncer::SyncError::DATATYPE_ERROR, 193 syncer::SyncError::DATATYPE_ERROR,
194 "error", 194 "error",
195 syncer::PREFERENCES); 195 syncer::PREFERENCES);
196 preference_dtc_->OnSingleDataTypeUnrecoverableError(error); 196 preference_dtc_->OnSingleDataTypeUnrecoverableError(error);
197 } 197 }
198 198
199 } // namespace 199 } // namespace
200 } // namespace sync_driver 200 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync_driver/sync_prefs_unittest.cc ('k') | components/timers/alarm_timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698