OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_BROWSERTEST_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_BROWSERTEST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/public/test/download_test_observer.h" | 9 #include "content/public/test/download_test_observer.h" |
10 | 10 |
11 // DownloadTestObserver subclass that observes a download until it transitions | 11 // DownloadTestObserver subclass that observes a download until it transitions |
12 // from IN_PROGRESS to another state, but only after StartObserving() is called. | 12 // from IN_PROGRESS to another state, but only after StartObserving() is called. |
13 class DownloadTestObserverNotInProgress : public content::DownloadTestObserver { | 13 class DownloadTestObserverNotInProgress : public content::DownloadTestObserver { |
14 public: | 14 public: |
15 DownloadTestObserverNotInProgress(content::DownloadManager* download_manager, | 15 DownloadTestObserverNotInProgress(content::DownloadManager* download_manager, |
16 size_t count); | 16 size_t count); |
17 virtual ~DownloadTestObserverNotInProgress(); | 17 virtual ~DownloadTestObserverNotInProgress(); |
18 | 18 |
19 void StartObserving(); | 19 void StartObserving(); |
20 | 20 |
21 private: | 21 private: |
22 virtual bool IsDownloadInFinalState(content::DownloadItem* download) OVERRIDE; | 22 virtual bool IsDownloadInFinalState(content::DownloadItem* download) override; |
23 | 23 |
24 bool started_observing_; | 24 bool started_observing_; |
25 | 25 |
26 DISALLOW_COPY_AND_ASSIGN(DownloadTestObserverNotInProgress); | 26 DISALLOW_COPY_AND_ASSIGN(DownloadTestObserverNotInProgress); |
27 }; | 27 }; |
28 | 28 |
29 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_BROWSERTEST_H_ | 29 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_BROWSERTEST_H_ |
OLD | NEW |