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

Unified Diff: chrome/browser/android/offline_pages/recent_tab_helper.cc

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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/offline_pages/recent_tab_helper.cc
diff --git a/chrome/browser/android/offline_pages/recent_tab_helper.cc b/chrome/browser/android/offline_pages/recent_tab_helper.cc
index 416a99249df41b8dd0eed741743355f86fe0e504..9e7bdc2d41f066b1b99980b873e7ce86b63d278a 100644
--- a/chrome/browser/android/offline_pages/recent_tab_helper.cc
+++ b/chrome/browser/android/offline_pages/recent_tab_helper.cc
@@ -17,7 +17,7 @@
#include "base/time/time.h"
#include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h"
#include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
-#include "chrome/browser/android/tab_android.h"
+#include "chrome/browser/android/offline_pages/offline_page_utils.h"
#include "components/offline_pages/client_namespace_constants.h"
#include "components/offline_pages/offline_page_item.h"
#include "components/offline_pages/offline_page_model.h"
@@ -43,11 +43,7 @@ class DefaultDelegate: public offline_pages::RecentTabHelper::Delegate {
return base::ThreadTaskRunnerHandle::Get();
}
bool GetTabId(content::WebContents* web_contents, int* tab_id) override {
- TabAndroid* tab_android = TabAndroid::FromWebContents(web_contents);
- if (!tab_android)
- return false;
- *tab_id = tab_android->GetAndroidId();
- return true;
+ return offline_pages::OfflinePageUtils::GetTabId(web_contents, tab_id);
}
};
} // namespace
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_utils.cc ('k') | components/offline_pages/client_policy_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698