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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_utils.h

Issue 2841823004: Use DownloadManager to download non-html res when download icon pressed (Closed)
Patch Set: Add comment Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const GURL& url, 102 const GURL& url,
103 const DuplicateCheckCallback& callback); 103 const DuplicateCheckCallback& callback);
104 104
105 // Schedules to download a page from |url| and categorize under |name_space|. 105 // Schedules to download a page from |url| and categorize under |name_space|.
106 // The duplicate pages or requests will be checked. Note that |url| can be 106 // The duplicate pages or requests will be checked. Note that |url| can be
107 // different from the one rendered in |web_contents|. 107 // different from the one rendered in |web_contents|.
108 static void ScheduleDownload(content::WebContents* web_contents, 108 static void ScheduleDownload(content::WebContents* web_contents,
109 const std::string& name_space, 109 const std::string& name_space,
110 const GURL& url, 110 const GURL& url,
111 DownloadUIActionFlags ui_action); 111 DownloadUIActionFlags ui_action);
112
113 // Determines if offline page download should be triggered based on MIME type
114 // of download resource.
115 static bool CanDownloadAsOfflinePage(const GURL& url,
116 const std::string& contents_mime_type);
112 }; 117 };
113 118
114 } // namespace offline_pages 119 } // namespace offline_pages
115 120
116 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_ 121 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698