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

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

Issue 16092013: Use base::MessageLoop in more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, sigh Created 7 years, 6 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 | Annotate | Revision Log
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/history_model_worker.h" 5 #include "chrome/browser/sync/glue/history_model_worker.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 30 matching lines...) Expand all
41 syncer::SyncerError* error_; 41 syncer::SyncerError* error_;
42 }; 42 };
43 43
44 class AddDBThreadObserverTask : public history::HistoryDBTask { 44 class AddDBThreadObserverTask : public history::HistoryDBTask {
45 public: 45 public:
46 AddDBThreadObserverTask(HistoryModelWorker* history_worker) 46 AddDBThreadObserverTask(HistoryModelWorker* history_worker)
47 : history_worker_(history_worker) {} 47 : history_worker_(history_worker) {}
48 48
49 virtual bool RunOnDBThread(history::HistoryBackend* backend, 49 virtual bool RunOnDBThread(history::HistoryBackend* backend,
50 history::HistoryDatabase* db) OVERRIDE { 50 history::HistoryDatabase* db) OVERRIDE {
51 MessageLoop::current()->AddDestructionObserver(history_worker_.get()); 51 base::MessageLoop::current()->AddDestructionObserver(history_worker_.get());
52 return true; 52 return true;
53 } 53 }
54 54
55 virtual void DoneRunOnMainThread() OVERRIDE {} 55 virtual void DoneRunOnMainThread() OVERRIDE {}
56 56
57 private: 57 private:
58 virtual ~AddDBThreadObserverTask() {} 58 virtual ~AddDBThreadObserverTask() {}
59 59
60 scoped_refptr<HistoryModelWorker> history_worker_; 60 scoped_refptr<HistoryModelWorker> history_worker_;
61 }; 61 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return error; 110 return error;
111 } 111 }
112 112
113 syncer::ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() { 113 syncer::ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() {
114 return syncer::GROUP_HISTORY; 114 return syncer::GROUP_HISTORY;
115 } 115 }
116 116
117 HistoryModelWorker::~HistoryModelWorker() {} 117 HistoryModelWorker::~HistoryModelWorker() {}
118 118
119 } // namespace browser_sync 119 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/generic_change_processor_unittest.cc ('k') | chrome/browser/sync/glue/password_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698