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

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_tab_helper.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: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_TAB_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_TAB_HELPER_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_TAB_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/offline_pages/offline_page_types.h" 10 #include "components/offline_pages/offline_page_types.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 content::NavigationHandle* navigation_handle) override; 48 content::NavigationHandle* navigation_handle) override;
49 void DidFinishNavigation( 49 void DidFinishNavigation(
50 content::NavigationHandle* navigation_handle) override; 50 content::NavigationHandle* navigation_handle) override;
51 51
52 void RedirectToOnline(const GURL& from_url, 52 void RedirectToOnline(const GURL& from_url,
53 const OfflinePageItem* offline_page); 53 const OfflinePageItem* offline_page);
54 void TryRedirectToOffline(RedirectReason redirect_reason, 54 void TryRedirectToOffline(RedirectReason redirect_reason,
55 const GURL& from_url, 55 const GURL& from_url,
56 const OfflinePageItem* offline_page); 56 const OfflinePageItem* offline_page);
57 57
58 void GetBestPageAndTryRedirect(const GURL& online_url,
Dmitry Titov 2016/06/27 22:06:04 These two named almost the same. Consider renaming
fgorski 2016/06/27 22:40:09 Done.
59 RedirectReason reason);
60 void SelectBestPageAndTryRedirect(RedirectReason reason,
61 const GURL& online_url,
62 const MultipleOfflinePageItemResult& pages);
63
58 void Redirect(const GURL& from_url, const GURL& to_url); 64 void Redirect(const GURL& from_url, const GURL& to_url);
59 65
60 // Iff the tab we are associated with is redirected to an offline page, 66 // Iff the tab we are associated with is redirected to an offline page,
61 // |offline_page_| will be non-null. This can be used to synchronously ask 67 // |offline_page_| will be non-null. This can be used to synchronously ask
62 // about the offline state of the current web contents. 68 // about the offline state of the current web contents.
63 std::unique_ptr<OfflinePageItem> offline_page_; 69 std::unique_ptr<OfflinePageItem> offline_page_;
64 base::WeakPtrFactory<OfflinePageTabHelper> weak_ptr_factory_; 70 base::WeakPtrFactory<OfflinePageTabHelper> weak_ptr_factory_;
65 71
66 DISALLOW_COPY_AND_ASSIGN(OfflinePageTabHelper); 72 DISALLOW_COPY_AND_ASSIGN(OfflinePageTabHelper);
67 }; 73 };
68 74
69 } // namespace offline_pages 75 } // namespace offline_pages
70 76
71 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_TAB_HELPER_H_ 77 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698