| Index: content/public/test/download_test_observer.h
|
| diff --git a/chrome/browser/download/download_test_observer.h b/content/public/test/download_test_observer.h
|
| similarity index 87%
|
| rename from chrome/browser/download/download_test_observer.h
|
| rename to content/public/test/download_test_observer.h
|
| index 160c80d7f954862806d864c3702e03043d7ec3f2..8a62286e936bd47b674388138fcf4a93b65f68f7 100644
|
| --- a/chrome/browser/download/download_test_observer.h
|
| +++ b/content/public/test/download_test_observer.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TEST_OBSERVER_H_
|
| -#define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TEST_OBSERVER_H_
|
| +#ifndef CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
|
| +#define CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
|
|
|
| #include <set>
|
| #include <vector>
|
| @@ -15,11 +15,7 @@
|
| #include "content/public/browser/download_url_parameters.h"
|
| #include "net/base/net_errors.h"
|
|
|
| -namespace internal {
|
| -class MockFileChooserDownloadManagerDelegate;
|
| -}
|
| -
|
| -class Profile;
|
| +namespace content {
|
|
|
| // Detects changes to the downloads after construction.
|
| // Finishes when one of the following happens:
|
| @@ -266,30 +262,6 @@ class DownloadTestItemCreationObserver
|
| DISALLOW_COPY_AND_ASSIGN(DownloadTestItemCreationObserver);
|
| };
|
|
|
| -// Observes and overrides file chooser activity for a profile. By default, once
|
| -// attached to a profile, this class overrides the default file chooser by
|
| -// replacing the ChromeDownloadManagerDelegate associated with |profile|.
|
| -// NOTE: Again, this overrides the ChromeDownloadManagerDelegate for |profile|.
|
| -class DownloadTestFileChooserObserver {
|
| - public:
|
| - // Attaches to |profile|. By default file chooser dialogs will be disabled
|
| - // once attached. Call EnableFileChooser() to re-enable.
|
| - explicit DownloadTestFileChooserObserver(Profile* profile);
|
| - ~DownloadTestFileChooserObserver();
|
| -
|
| - // Sets whether the file chooser dialog is enabled. If |enable| is false, any
|
| - // attempt to display a file chooser dialog will cause the download to be
|
| - // canceled. Otherwise, attempting to display a file chooser dialog will
|
| - // result in the download continuing with the suggested path.
|
| - void EnableFileChooser(bool enable);
|
| -
|
| - // Returns true if a file chooser dialog was displayed since the last time
|
| - // this method was called.
|
| - bool TestAndResetDidShowFileChooser();
|
| -
|
| - private:
|
| - scoped_refptr<internal::MockFileChooserDownloadManagerDelegate>
|
| - test_delegate_;
|
| -};
|
| +} // namespace content`
|
|
|
| -#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TEST_OBSERVER_H_
|
| +#endif // CONTENT_TEST_DOWNLOAD_TEST_OBSERVER_H_
|
|
|