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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 3194005: Clear cookie related settings at the beginning of a navigation instead of at the end. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_specific_content_settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 // For GdkScreen 8 // For GdkScreen
9 #include <gdk/gdk.h> 9 #include <gdk/gdk.h>
10 #endif // defined(OS_CHROMEOS) 10 #endif // defined(OS_CHROMEOS)
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 } 1618 }
1619 1619
1620 // Close blocked popups. 1620 // Close blocked popups.
1621 if (blocked_popups_) { 1621 if (blocked_popups_) {
1622 AutoReset<bool> auto_reset(&dont_notify_render_view_, true); 1622 AutoReset<bool> auto_reset(&dont_notify_render_view_, true);
1623 blocked_popups_->Destroy(); 1623 blocked_popups_->Destroy();
1624 blocked_popups_ = NULL; 1624 blocked_popups_ = NULL;
1625 } 1625 }
1626 1626
1627 // Clear "blocked" flags. 1627 // Clear "blocked" flags.
1628 content_settings_delegate_->ClearBlockedContentSettings(); 1628 content_settings_delegate_->ClearBlockedContentSettingsExceptForCookies();
1629 content_settings_delegate_->GeolocationDidNavigate(details); 1629 content_settings_delegate_->GeolocationDidNavigate(details);
1630 1630
1631 // Once the main frame is navigated, we're no longer considered to have 1631 // Once the main frame is navigated, we're no longer considered to have
1632 // displayed insecure content. 1632 // displayed insecure content.
1633 displayed_insecure_content_ = false; 1633 displayed_insecure_content_ = false;
1634 } 1634 }
1635 1635
1636 // Close constrained windows if necessary. 1636 // Close constrained windows if necessary.
1637 if (!net::RegistryControlledDomainService::SameDomainOrHost( 1637 if (!net::RegistryControlledDomainService::SameDomainOrHost(
1638 details.previous_url, details.entry->url())) 1638 details.previous_url, details.entry->url()))
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 RenderViewHost* render_view_host, 2058 RenderViewHost* render_view_host,
2059 bool is_main_frame, 2059 bool is_main_frame,
2060 const GURL& url) { 2060 const GURL& url) {
2061 ProvisionalLoadDetails details(is_main_frame, 2061 ProvisionalLoadDetails details(is_main_frame,
2062 controller_.IsURLInPageNavigation(url), 2062 controller_.IsURLInPageNavigation(url),
2063 url, std::string(), false); 2063 url, std::string(), false);
2064 NotificationService::current()->Notify( 2064 NotificationService::current()->Notify(
2065 NotificationType::FRAME_PROVISIONAL_LOAD_START, 2065 NotificationType::FRAME_PROVISIONAL_LOAD_START,
2066 Source<NavigationController>(&controller_), 2066 Source<NavigationController>(&controller_),
2067 Details<ProvisionalLoadDetails>(&details)); 2067 Details<ProvisionalLoadDetails>(&details));
2068 if (is_main_frame)
2069 content_settings_delegate_->ClearCookieSpecificContentSettings();
2068 } 2070 }
2069 2071
2070 void TabContents::DidStartReceivingResourceResponse( 2072 void TabContents::DidStartReceivingResourceResponse(
2071 const ResourceRequestDetails& details) { 2073 const ResourceRequestDetails& details) {
2072 NotificationService::current()->Notify( 2074 NotificationService::current()->Notify(
2073 NotificationType::RESOURCE_RESPONSE_STARTED, 2075 NotificationType::RESOURCE_RESPONSE_STARTED,
2074 Source<NavigationController>(&controller()), 2076 Source<NavigationController>(&controller()),
2075 Details<const ResourceRequestDetails>(&details)); 2077 Details<const ResourceRequestDetails>(&details));
2076 } 2078 }
2077 2079
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); 3302 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save));
3301 } 3303 }
3302 3304
3303 Profile* TabContents::GetProfileForPasswordManager() { 3305 Profile* TabContents::GetProfileForPasswordManager() {
3304 return profile(); 3306 return profile();
3305 } 3307 }
3306 3308
3307 bool TabContents::DidLastPageLoadEncounterSSLErrors() { 3309 bool TabContents::DidLastPageLoadEncounterSSLErrors() {
3308 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); 3310 return controller().ssl_manager()->ProcessedSSLErrorFromRequest();
3309 } 3311 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/tab_specific_content_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698