Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / download / download_request_limiter.h
index 4ecf370..2b4e790 100644 (file)
@@ -13,7 +13,7 @@
 #include "base/gtest_prod_util.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "chrome/common/content_settings.h"
+#include "components/content_settings/core/common/content_settings.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
 #include "content/public/browser/web_contents_observer.h"
@@ -101,19 +101,13 @@ class DownloadRequestLimiter
       return download_count_;
     }
 
-    // Promote protected accessor to public.
-    content::WebContents* web_contents() const {
-      return content::WebContentsObserver::web_contents();
-    }
-
     // content::WebContentsObserver overrides.
     virtual void AboutToNavigateRenderView(
         content::RenderViewHost* render_view_host) OVERRIDE;
     // Invoked when a user gesture occurs (mouse click, enter or space). This
     // may result in invoking Remove on DownloadRequestLimiter.
     virtual void DidGetUserGesture() OVERRIDE;
-    virtual void WebContentsDestroyed(
-        content::WebContents* web_contents) OVERRIDE;
+    virtual void WebContentsDestroyed() OVERRIDE;
 
     // Asks the user if they really want to allow the download.
     // See description above CanDownloadOnIOThread for details on lifetime of
@@ -190,7 +184,7 @@ class DownloadRequestLimiter
   // WARNING: both this call and the callback are invoked on the io thread.
   void CanDownloadOnIOThread(int render_process_host_id,
                              int render_view_id,
-                             int request_id,
+                             const GURL& url,
                              const std::string& request_method,
                              const Callback& callback);
 
@@ -218,21 +212,19 @@ class DownloadRequestLimiter
   // tab and invokes CanDownloadImpl.
   void CanDownload(int render_process_host_id,
                    int render_view_id,
-                   int request_id,
+                   const GURL& url,
                    const std::string& request_method,
                    const Callback& callback);
 
   // Does the work of updating the download status on the UI thread and
   // potentially prompting the user.
   void CanDownloadImpl(content::WebContents* originating_contents,
-                       int request_id,
                        const std::string& request_method,
                        const Callback& callback);
 
   // Invoked when decision to download has been made.
   void OnCanDownloadDecided(int render_process_host_id,
                             int render_view_id,
-                            int request_id,
                             const std::string& request_method,
                             const Callback& orig_callback,
                             bool allow);