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

Side by Side Diff: chrome/browser/download/download_test_observer.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <vector> 5 #include <vector>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/task.h" 10 #include "base/task.h"
11 #include "chrome/browser/download/download_test_observer.h" 11 #include "chrome/browser/download/download_test_observer.h"
12 #include "chrome/test/base/ui_test_utils.h" 12 #include "chrome/test/base/ui_test_utils.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 14
15 using content::BrowserThread;
16
15 // These functions take scoped_refptr's to DownloadManager because they 17 // These functions take scoped_refptr's to DownloadManager because they
16 // are posted to message queues, and hence may execute arbitrarily after 18 // are posted to message queues, and hence may execute arbitrarily after
17 // their actual posting. Once posted, there is no connection between 19 // their actual posting. Once posted, there is no connection between
18 // these routines and the DownloadTestObserver class from which they came, 20 // these routines and the DownloadTestObserver class from which they came,
19 // so the DownloadTestObserver's reference to the DownloadManager cannot 21 // so the DownloadTestObserver's reference to the DownloadManager cannot
20 // be counted on to keep the DownloadManager around. 22 // be counted on to keep the DownloadManager around.
21 23
22 // Fake user click on "Accept". 24 // Fake user click on "Accept".
23 void AcceptDangerousDownload(scoped_refptr<DownloadManager> download_manager, 25 void AcceptDangerousDownload(scoped_refptr<DownloadManager> download_manager,
24 int32 download_id) { 26 int32 download_id) {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 if (--cycle) { 290 if (--cycle) {
289 BrowserThread::PostTask( 291 BrowserThread::PostTask(
290 BrowserThread::UI, FROM_HERE, 292 BrowserThread::UI, FROM_HERE,
291 NewRunnableMethod(this, &DownloadTestFlushObserver::PingFileThread, 293 NewRunnableMethod(this, &DownloadTestFlushObserver::PingFileThread,
292 cycle)); 294 cycle));
293 } else { 295 } else {
294 BrowserThread::PostTask( 296 BrowserThread::PostTask(
295 BrowserThread::UI, FROM_HERE, new MessageLoop::QuitTask()); 297 BrowserThread::UI, FROM_HERE, new MessageLoop::QuitTask());
296 } 298 }
297 } 299 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_safe_browsing_client_unittest.cc ('k') | chrome/browser/download/save_page_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698