| OLD | NEW |
| 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" |
| 11 #include "components/offline_pages/core/offline_page_model.h" | 11 #include "components/offline_pages/core/offline_page_model.h" |
| 12 | 12 #include "url/gurl.h" |
| 13 class GURL; | |
| 14 | 13 |
| 15 namespace base { | 14 namespace base { |
| 16 class Time; | 15 class Time; |
| 17 } | 16 } |
| 18 | 17 |
| 19 namespace content { | 18 namespace content { |
| 20 class BrowserContext; | 19 class BrowserContext; |
| 21 class WebContents; | 20 class WebContents; |
| 22 } | 21 } |
| 23 | 22 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 static void CheckExistenceOfRequestsWithURL( | 87 static void CheckExistenceOfRequestsWithURL( |
| 89 content::BrowserContext* browser_context, | 88 content::BrowserContext* browser_context, |
| 90 const std::string name_space, | 89 const std::string name_space, |
| 91 const GURL& url, | 90 const GURL& url, |
| 92 const PagesExistCallback& callback); | 91 const PagesExistCallback& callback); |
| 93 | 92 |
| 94 static bool EqualsIgnoringFragment(const GURL& lhs, const GURL& rhs); | 93 static bool EqualsIgnoringFragment(const GURL& lhs, const GURL& rhs); |
| 95 | 94 |
| 96 static void StartOfflinePageDownload(content::BrowserContext* context, | 95 static void StartOfflinePageDownload(content::BrowserContext* context, |
| 97 const GURL& url); | 96 const GURL& url); |
| 97 |
| 98 // Returns original URL of the given web contents. Empty URL is returned if |
| 99 // no redirect occurred. |
| 100 static GURL GetOriginalURLFromWebContents(content::WebContents* web_contents); |
| 98 }; | 101 }; |
| 99 | 102 |
| 100 } // namespace offline_pages | 103 } // namespace offline_pages |
| 101 | 104 |
| 102 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_ | 105 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_ |
| OLD | NEW |