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

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

Issue 629603002: replace OVERRIDE and FINAL with override and final in chrome/browser/[r-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 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) 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 "chrome/browser/sync/glue/typed_url_data_type_controller.h" 5 #include "chrome/browser/sync/glue/typed_url_data_type_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 21 matching lines...) Expand all
32 // the tasks we want to run. 32 // the tasks we want to run.
33 class RunTaskOnHistoryThread : public history::HistoryDBTask { 33 class RunTaskOnHistoryThread : public history::HistoryDBTask {
34 public: 34 public:
35 explicit RunTaskOnHistoryThread(const base::Closure& task, 35 explicit RunTaskOnHistoryThread(const base::Closure& task,
36 TypedUrlDataTypeController* dtc) 36 TypedUrlDataTypeController* dtc)
37 : task_(new base::Closure(task)), 37 : task_(new base::Closure(task)),
38 dtc_(dtc) { 38 dtc_(dtc) {
39 } 39 }
40 40
41 virtual bool RunOnDBThread(history::HistoryBackend* backend, 41 virtual bool RunOnDBThread(history::HistoryBackend* backend,
42 history::HistoryDatabase* db) OVERRIDE { 42 history::HistoryDatabase* db) override {
43 // Set the backend, then release our reference before executing the task. 43 // Set the backend, then release our reference before executing the task.
44 dtc_->SetBackend(backend); 44 dtc_->SetBackend(backend);
45 dtc_ = NULL; 45 dtc_ = NULL;
46 46
47 // Invoke the task, then free it immediately so we don't keep a reference 47 // Invoke the task, then free it immediately so we don't keep a reference
48 // around all the way until DoneRunOnMainThread() is invoked back on the 48 // around all the way until DoneRunOnMainThread() is invoked back on the
49 // main thread - we want to release references as soon as possible to avoid 49 // main thread - we want to release references as soon as possible to avoid
50 // keeping them around too long during shutdown. 50 // keeping them around too long during shutdown.
51 task_->Run(); 51 task_->Run();
52 task_.reset(); 52 task_.reset();
53 return true; 53 return true;
54 } 54 }
55 55
56 virtual void DoneRunOnMainThread() OVERRIDE {} 56 virtual void DoneRunOnMainThread() override {}
57 57
58 protected: 58 protected:
59 virtual ~RunTaskOnHistoryThread() {} 59 virtual ~RunTaskOnHistoryThread() {}
60 60
61 scoped_ptr<base::Closure> task_; 61 scoped_ptr<base::Closure> task_;
62 scoped_refptr<TypedUrlDataTypeController> dtc_; 62 scoped_refptr<TypedUrlDataTypeController> dtc_;
63 }; 63 };
64 64
65 } // namespace 65 } // namespace
66 66
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 void TypedUrlDataTypeController::DisconnectProcessor( 154 void TypedUrlDataTypeController::DisconnectProcessor(
155 sync_driver::ChangeProcessor* processor) { 155 sync_driver::ChangeProcessor* processor) {
156 static_cast<TypedUrlChangeProcessor*>(processor)->Disconnect(); 156 static_cast<TypedUrlChangeProcessor*>(processor)->Disconnect();
157 } 157 }
158 158
159 TypedUrlDataTypeController::~TypedUrlDataTypeController() {} 159 TypedUrlDataTypeController::~TypedUrlDataTypeController() {}
160 160
161 } // namespace browser_sync 161 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/typed_url_data_type_controller.h ('k') | chrome/browser/sync/glue/typed_url_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698