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

Side by Side Diff: chrome/browser/google_apis/task_util.cc

Issue 10913184: Move basic operation components for Drive API to chrome/browser/google_apis directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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/chromeos/gdata/task_util.h" 5 #include "chrome/browser/google_apis/task_util.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 9
10 using content::BrowserThread; 10 using content::BrowserThread;
11 11
12 namespace gdata { 12 namespace gdata {
13 13
14 void RunTaskOnThread(scoped_refptr<base::MessageLoopProxy> relay_proxy, 14 void RunTaskOnThread(scoped_refptr<base::MessageLoopProxy> relay_proxy,
15 const base::Closure& task) { 15 const base::Closure& task) {
16 if (relay_proxy->BelongsToCurrentThread()) { 16 if (relay_proxy->BelongsToCurrentThread()) {
17 task.Run(); 17 task.Run();
18 } else { 18 } else {
19 const bool posted = relay_proxy->PostTask(FROM_HERE, task); 19 const bool posted = relay_proxy->PostTask(FROM_HERE, task);
20 DCHECK(posted); 20 DCHECK(posted);
21 } 21 }
22 } 22 }
23 23
24 void RunTaskOnUIThread(const base::Closure& task) { 24 void RunTaskOnUIThread(const base::Closure& task) {
25 RunTaskOnThread( 25 RunTaskOnThread(
26 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), task); 26 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), task);
27 } 27 }
28 28
29 } // namespace gdata 29 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/task_util.h ('k') | chrome/browser/ui/webui/chromeos/drive_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698