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

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

Issue 2059513002: Remove obsoleted function and add test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove empty lines 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 11
12 class GURL; 12 class GURL;
13 13
14 namespace content { 14 namespace content {
15 class BrowserContext; 15 class BrowserContext;
16 } 16 }
17 17
18 namespace offline_pages { 18 namespace offline_pages {
19 struct OfflinePageItem; 19 struct OfflinePageItem;
20 20
21 class OfflinePageUtils { 21 class OfflinePageUtils {
22 public: 22 public:
23 // Returns true if |url| might point to an offline page. 23 // Returns true if |url| might point to an offline page.
24 static bool MightBeOfflineURL(const GURL& url); 24 static bool MightBeOfflineURL(const GURL& url);
25 25
26 // Gets an offline URL of an offline page with |online_url| if one exists. 26 // Gets an offline URL of an offline page with |online_url| if one exists.
27 // Deprecated. Use |GetOfflineURLForOnlineURL|.
28 static GURL MaybeGetOfflineURLForOnlineURL(
29 content::BrowserContext* browser_context,
30 const GURL& online_url);
31
32 static void GetOfflineURLForOnlineURL( 27 static void GetOfflineURLForOnlineURL(
33 content::BrowserContext* browser_context, 28 content::BrowserContext* browser_context,
34 const GURL& online_url, 29 const GURL& online_url,
35 const base::Callback<void(const GURL&)>& callback); 30 const base::Callback<void(const GURL&)>& callback);
36 31
37 // Gets an online URL of an offline page with |offline_url| if one exists. 32 // Gets an online URL of an offline page with |offline_url| if one exists.
38 // Deprecated. Use |GetOnlineURLForOfflineURL|. 33 // Deprecated. Use |GetOnlineURLForOfflineURL|.
39 static GURL MaybeGetOnlineURLForOfflineURL( 34 static GURL MaybeGetOnlineURLForOfflineURL(
40 content::BrowserContext* browser_context, 35 content::BrowserContext* browser_context,
41 const GURL& offline_url); 36 const GURL& offline_url);
(...skipping 14 matching lines...) Expand all
56 const GURL& online_url); 51 const GURL& online_url);
57 52
58 // Marks that the offline page related to the |offline_url| has been accessed. 53 // Marks that the offline page related to the |offline_url| has been accessed.
59 static void MarkPageAccessed(content::BrowserContext* browser_context, 54 static void MarkPageAccessed(content::BrowserContext* browser_context,
60 const GURL& offline_url); 55 const GURL& offline_url);
61 }; 56 };
62 57
63 } // namespace offline_pages 58 } // namespace offline_pages
64 59
65 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_ 60 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/offline_page_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698