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

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

Issue 2100043004: [Offline pages] Filter out pages cached by different tabs on tab helper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating comment to address CR Created 4 years, 5 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Marks that the offline page related to the |offline_url| has been accessed. 54 // Marks that the offline page related to the |offline_url| has been accessed.
55 static void MarkPageAccessed(content::BrowserContext* browser_context, 55 static void MarkPageAccessed(content::BrowserContext* browser_context,
56 const GURL& offline_url); 56 const GURL& offline_url);
57 57
58 // Gets the offline page corresponding to the given web contents. The 58 // Gets the offline page corresponding to the given web contents. The
59 // returned pointer is owned by the web_contents and may be deleted by user 59 // returned pointer is owned by the web_contents and may be deleted by user
60 // navigation, so it is unsafe to store a copy of the returned pointer. 60 // navigation, so it is unsafe to store a copy of the returned pointer.
61 static const OfflinePageItem* GetOfflinePageFromWebContents( 61 static const OfflinePageItem* GetOfflinePageFromWebContents(
62 content::WebContents* web_contents); 62 content::WebContents* web_contents);
63
64 // Gets an Android Tab ID from a tab containing |web_contents|. Returns false,
65 // when tab is not available. Returns true otherwise and sets |tab_id| to the
66 // ID of the tab.
67 static bool GetTabId(content::WebContents* web_contents, int* tab_id);
63 }; 68 };
64 69
65 } // namespace offline_pages 70 } // namespace offline_pages
66 71
67 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_ 72 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698