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

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

Issue 5254005: Do not reset the content settings delegate's cookies when a network error occurred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/tab_contents
Patch Set: rebase Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/test/data/redirect-loop.html » ('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 #include <cmath> 7 #include <cmath>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 2132
2133 void TabContents::OnInstantSupportDetermined(int32 page_id, bool result) { 2133 void TabContents::OnInstantSupportDetermined(int32 page_id, bool result) {
2134 if (delegate()) 2134 if (delegate())
2135 delegate()->OnInstantSupportDetermined(page_id, result); 2135 delegate()->OnInstantSupportDetermined(page_id, result);
2136 } 2136 }
2137 2137
2138 void TabContents::DidStartProvisionalLoadForFrame( 2138 void TabContents::DidStartProvisionalLoadForFrame(
2139 RenderViewHost* render_view_host, 2139 RenderViewHost* render_view_host,
2140 int64 frame_id, 2140 int64 frame_id,
2141 bool is_main_frame, 2141 bool is_main_frame,
2142 bool is_error_page,
2142 const GURL& url) { 2143 const GURL& url) {
2143 ProvisionalLoadDetails details(is_main_frame, 2144 ProvisionalLoadDetails details(is_main_frame,
2144 controller_.IsURLInPageNavigation(url), 2145 controller_.IsURLInPageNavigation(url),
2145 url, std::string(), false, frame_id); 2146 url, std::string(), false, frame_id);
2146 NotificationService::current()->Notify( 2147 NotificationService::current()->Notify(
2147 NotificationType::FRAME_PROVISIONAL_LOAD_START, 2148 NotificationType::FRAME_PROVISIONAL_LOAD_START,
2148 Source<NavigationController>(&controller_), 2149 Source<NavigationController>(&controller_),
2149 Details<ProvisionalLoadDetails>(&details)); 2150 Details<ProvisionalLoadDetails>(&details));
2150 if (is_main_frame) { 2151 if (is_main_frame) {
2151 content_settings_delegate_->ClearCookieSpecificContentSettings(); 2152 // If we're displaying a network error page do not reset the content
2153 // settings delegate's cookies so the user has a chance to modify cookie
2154 // settings.
2155 if (!is_error_page)
2156 content_settings_delegate_->ClearCookieSpecificContentSettings();
2152 content_settings_delegate_->ClearGeolocationContentSettings(); 2157 content_settings_delegate_->ClearGeolocationContentSettings();
2153 } 2158 }
2154 } 2159 }
2155 2160
2156 void TabContents::DidStartReceivingResourceResponse( 2161 void TabContents::DidStartReceivingResourceResponse(
2157 const ResourceRequestDetails& details) { 2162 const ResourceRequestDetails& details) {
2158 NotificationService::current()->Notify( 2163 NotificationService::current()->Notify(
2159 NotificationType::RESOURCE_RESPONSE_STARTED, 2164 NotificationType::RESOURCE_RESPONSE_STARTED,
2160 Source<NavigationController>(&controller()), 2165 Source<NavigationController>(&controller()),
2161 Details<const ResourceRequestDetails>(&details)); 2166 Details<const ResourceRequestDetails>(&details));
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
3240 } 3245 }
3241 3246
3242 void TabContents::set_encoding(const std::string& encoding) { 3247 void TabContents::set_encoding(const std::string& encoding) {
3243 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 3248 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
3244 } 3249 }
3245 3250
3246 void TabContents::SetAppIcon(const SkBitmap& app_icon) { 3251 void TabContents::SetAppIcon(const SkBitmap& app_icon) {
3247 app_icon_ = app_icon; 3252 app_icon_ = app_icon;
3248 NotifyNavigationStateChanged(INVALIDATE_TITLE); 3253 NotifyNavigationStateChanged(INVALIDATE_TITLE);
3249 } 3254 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/test/data/redirect-loop.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698