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

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

Issue 1521193002: [Offline pages] Refactor URL conversions from TabAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding temp files Created 5 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
7
8 #include "base/basictypes.h"
9
10 class GURL;
11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace offline_pages {
17 struct OfflinePageItem;
18
19 namespace android {
20
21 // Returns true if |url| might points to an offline page.
dewittj 2015/12/15 00:59:25 nit: might point to
fgorski 2015/12/15 16:33:01 Done.
22 bool MightBeOfflineURL(const GURL& url);
23
24 // Gets an offline URL of an offline page with |online_url| if one is present in
25 // the |browser_context|.
26 GURL GetOfflineURLByOnlineURL(content::BrowserContext* browser_context,
dewittj 2015/12/15 00:59:25 Nit: If not too much work, s/By/From/ would make t
fgorski 2015/12/15 16:33:01 This adheres to the naming convention used by the
27 const GURL& online_url);
28
29 // Gets an online URL of an offline page with |offline_url| if one is present in
30 // the |browser_context|.
31 GURL GetOnlineURLByOfflineURL(content::BrowserContext* browser_context,
32 const GURL& offline_url);
33
34 // Gets a bookmark ID related to the |offline_url|.
35 int64 GetBookmarkIdByOfflineURL(content::BrowserContext* browser_context,
36 const GURL& offline_url);
37
38 // Checks whether a give |offline_url| points to an offline page.
39 bool IsOfflinePage(content::BrowserContext* browser_context,
40 const GURL& offline_url);
41
42 // Checks whether a given |online_url| has a related offline page.
43 bool HasOfflinePageForOnlineURL(content::BrowserContext* browser_context,
44 const GURL& online_url);
45
46 // Checks if there are any offline pages saved in the |browser_context|
47 const bool HasOfflinePages(content::BrowserContext* browser_context);
48
49 } // namespace android
50 } // namespace offline_pages
51
52 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698