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

Unified Diff: chrome/browser/android/download/download_controller_android.h

Issue 2014803002: Move DownloadControllerAndroid from content/ to chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved DownloadControllerAndroid(Impl) to chrome/ Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/download/download_controller_android.h
diff --git a/content/public/browser/android/download_controller_android.h b/chrome/browser/android/download/download_controller_android.h
similarity index 79%
rename from content/public/browser/android/download_controller_android.h
rename to chrome/browser/android/download/download_controller_android.h
index 7eda0e9774b3202944c1e47469fbde90f2ff309b..1de35a40e8b7914d34197cbabb40ca9294b3a77c 100644
--- a/content/public/browser/android/download_controller_android.h
+++ b/chrome/browser/android/download/download_controller_android.h
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
-#define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
+#ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_ANDROID_H_
+#define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_ANDROID_H_
#include "base/callback.h"
-#include "content/common/content_export.h"
#include "content/public/browser/download_item.h"
#include "content/public/common/context_menu_params.h"
namespace content {
class DownloadItem;
class WebContents;
+}
// Interface to request GET downloads and send notifications for POST
// downloads.
-class CONTENT_EXPORT DownloadControllerAndroid : public DownloadItem::Observer {
+class DownloadControllerAndroid : public content::DownloadItem::Observer {
no sievers 2016/06/07 21:35:23 nit: you don't need the base class interface anymo
no sievers 2016/06/07 21:37:26 Oops I missed the mock implementation. Maybe Downl
Jinsuk Kim 2016/06/08 06:29:08 Acknowledged.
Jinsuk Kim 2016/06/08 06:29:08 Done.
public:
// Returns the singleton instance of the DownloadControllerAndroid.
static DownloadControllerAndroid* Get();
@@ -33,15 +33,16 @@ class CONTENT_EXPORT DownloadControllerAndroid : public DownloadItem::Observer {
// Should be called when a download is started. It can be either a GET
// request with authentication or a POST request. Notifies the embedding
// app about the download. Should be called on the UI thread.
- virtual void OnDownloadStarted(DownloadItem* download_item) = 0;
+ virtual void OnDownloadStarted(content::DownloadItem* download_item) = 0;
// Called when a download is initiated by context menu.
virtual void StartContextMenuDownload(
- const ContextMenuParams& params, WebContents* web_contents,
+ const content::ContextMenuParams& params,
+ content::WebContents* web_contents,
bool is_link, const std::string& extra_headers) = 0;
// Called when a dangerous download item is verified or rejected.
- virtual void DangerousDownloadValidated(WebContents* web_contents,
+ virtual void DangerousDownloadValidated(content::WebContents* web_contents,
const std::string& download_guid,
bool accept) = 0;
@@ -52,11 +53,11 @@ class CONTENT_EXPORT DownloadControllerAndroid : public DownloadItem::Observer {
// Called to prompt the user for file access permission. When finished,
// |callback| will be executed.
virtual void AcquireFileAccessPermission(
- WebContents* web_contents,
+ content::WebContents* web_contents,
const AcquireFileAccessPermissionCallback& callback) = 0;
// Called by unit test to approve or disapprove file access request.
- virtual void SetApproveFileAccessRequestForTesting(bool approve) {};
+ virtual void SetApproveFileAccessRequestForTesting(bool approve) {}
// Called to set the default download file name if it cannot be resolved
// from url and content disposition
@@ -67,6 +68,4 @@ class CONTENT_EXPORT DownloadControllerAndroid : public DownloadItem::Observer {
static DownloadControllerAndroid* download_controller_;
};
-} // namespace content
-
-#endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
+#endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698