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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.h

Issue 2374443003: Fix content settings's cookie code to work with PlzNavigate. (Closed)
Patch Set: Created 4 years, 3 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/content_settings/tab_specific_content_settings.h
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.h b/chrome/browser/content_settings/tab_specific_content_settings.h
index 6f0b92c29e284a763507353fc80e81cdc2e4c31e..9c07aa00ea61eebddf304e54eb54e09aad54671a 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.h
+++ b/chrome/browser/content_settings/tab_specific_content_settings.h
@@ -102,24 +102,24 @@ class TabSpecificContentSettings
// current page or while loading it. |blocked_by_policy| should be true, if
// reading cookies was blocked due to the user's content settings. In that
// case, this function should invoke OnContentBlocked.
- static void CookiesRead(int render_process_id,
- int render_frame_id,
- const GURL& url,
- const GURL& first_party_url,
- const net::CookieList& cookie_list,
- bool blocked_by_policy);
+ static void CookiesRead(
+ const base::Callback<content::WebContents*(void)>& wc_getter,
+ const GURL& url,
+ const GURL& first_party_url,
+ const net::CookieList& cookie_list,
+ bool blocked_by_policy);
// Called when a specific cookie in the current page was changed.
// |blocked_by_policy| should be true, if the cookie was blocked due to the
// user's content settings. In that case, this function should invoke
// OnContentBlocked.
- static void CookieChanged(int render_process_id,
- int render_frame_id,
- const GURL& url,
- const GURL& first_party_url,
- const std::string& cookie_line,
- const net::CookieOptions& options,
- bool blocked_by_policy);
+ static void CookieChanged(
+ const base::Callback<content::WebContents*(void)>& wc_getter,
+ const GURL& url,
+ const GURL& first_party_url,
+ const std::string& cookie_line,
+ const net::CookieOptions& options,
+ bool blocked_by_policy);
// Called when a specific Web database in the current page was accessed. If
// access was blocked due to the user's content settings,
@@ -398,14 +398,10 @@ class TabSpecificContentSettings
content::RenderFrameHost* render_frame_host) override;
bool OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* render_frame_host) override;
- void DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) override;
- void DidStartProvisionalLoadForFrame(
- content::RenderFrameHost* render_frame_host,
- const GURL& validated_url,
- bool is_error_page,
- bool is_iframe_srcdoc) override;
+ void DidStartNavigation(
+ content::NavigationHandle* navigation_handle) override;
+ void DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) override;
void AppCacheAccessed(const GURL& manifest_url,
bool blocked_by_policy) override;
@@ -425,11 +421,10 @@ class TabSpecificContentSettings
void ClearMidiContentSettings();
// Updates Geolocation settings on navigation.
- void GeolocationDidNavigate(
- const content::LoadCommittedDetails& details);
+ void GeolocationDidNavigate(content::NavigationHandle* navigation_handle);
// Updates MIDI settings on navigation.
- void MidiDidNavigate(const content::LoadCommittedDetails& details);
+ void MidiDidNavigate(content::NavigationHandle* navigation_handle);
// All currently registered |SiteDataObserver|s.
base::ObserverList<SiteDataObserver> observer_list_;
@@ -493,6 +488,9 @@ class TabSpecificContentSettings
bool subresource_filter_enabled_;
bool subresource_filter_blockage_indicated_;
+ // Holds the previous committed url during a navigation.
+ GURL previous_url_;
+
// Observer to watch for content settings changed.
ScopedObserver<HostContentSettingsMap, content_settings::Observer> observer_;

Powered by Google App Engine
This is Rietveld 408576698