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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "base/waitable_event.h" 10 #include "base/waitable_event.h"
(...skipping 28 matching lines...) Expand all
39 39
40 HistoryModelWorker::HistoryModelWorker(HistoryService* history_service) 40 HistoryModelWorker::HistoryModelWorker(HistoryService* history_service)
41 : history_service_(history_service) { 41 : history_service_(history_service) {
42 } 42 }
43 43
44 HistoryModelWorker::~HistoryModelWorker() { 44 HistoryModelWorker::~HistoryModelWorker() {
45 } 45 }
46 46
47 void HistoryModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { 47 void HistoryModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) {
48 WaitableEvent done(false, false); 48 WaitableEvent done(false, false);
49 scoped_refptr<WorkerTask> task = new WorkerTask(work, &done); 49 scoped_refptr<WorkerTask> task(new WorkerTask(work, &done));
50 history_service_->ScheduleDBTask(task.get(), this); 50 history_service_->ScheduleDBTask(task.get(), this);
51 done.Wait(); 51 done.Wait();
52 } 52 }
53 53
54 bool HistoryModelWorker::CurrentThreadIsWorkThread() { 54 bool HistoryModelWorker::CurrentThreadIsWorkThread() {
55 // TODO(ncarter): How to determine this? 55 // TODO(ncarter): How to determine this?
56 return true; 56 return true;
57 } 57 }
58 58
59 } // namespace browser_sync 59 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698