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

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

Issue 10232010: DownloadUrlParameters (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixes Created 8 years, 7 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.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 #include "content/public/browser/download_url_parameters.h"
14 15
15 using content::BrowserThread; 16 using content::BrowserThread;
16 using content::DownloadItem; 17 using content::DownloadItem;
17 using content::DownloadManager; 18 using content::DownloadManager;
18 19
19 // These functions take scoped_refptr's to DownloadManager because they 20 // These functions take scoped_refptr's to DownloadManager because they
20 // are posted to message queues, and hence may execute arbitrarily after 21 // are posted to message queues, and hence may execute arbitrarily after
21 // their actual posting. Once posted, there is no connection between 22 // their actual posting. Once posted, there is no connection between
22 // these routines and the DownloadTestObserver class from which 23 // these routines and the DownloadTestObserver class from which
23 // they came, so the DownloadTestObserver's reference to the 24 // they came, so the DownloadTestObserver's reference to the
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 388
388 download_id_ = download_id; 389 download_id_ = download_id;
389 error_ = error; 390 error_ = error;
390 ++called_back_count_; 391 ++called_back_count_;
391 DCHECK_EQ(1u, called_back_count_); 392 DCHECK_EQ(1u, called_back_count_);
392 393
393 if (waiting_) 394 if (waiting_)
394 MessageLoopForUI::current()->Quit(); 395 MessageLoopForUI::current()->Quit();
395 } 396 }
396 397
397 const content::DownloadManager::OnStartedCallback 398 const content::DownloadUrlParameters::OnStartedCallback
398 DownloadTestItemCreationObserver::callback() { 399 DownloadTestItemCreationObserver::callback() {
399 return base::Bind( 400 return base::Bind(
400 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this); 401 &DownloadTestItemCreationObserver::DownloadItemCreationCallback, this);
401 } 402 }
402 403
OLDNEW
« no previous file with comments | « chrome/browser/download/download_test_observer.h ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698