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

Side by Side Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 23678007: OAuth2LoginManager+MergeSessionThrottle hardening, multi-profle support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/chrome_resource_dispatcher_host_delegate. h" 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 #if defined(OS_CHROMEOS) 285 #if defined(OS_CHROMEOS)
286 if (resource_type == ResourceType::MAIN_FRAME) { 286 if (resource_type == ResourceType::MAIN_FRAME) {
287 // We check offline first, then check safe browsing so that we still can 287 // We check offline first, then check safe browsing so that we still can
288 // block unsafe site after we remove offline page. 288 // block unsafe site after we remove offline page.
289 throttles->push_back(new OfflineResourceThrottle(request, 289 throttles->push_back(new OfflineResourceThrottle(request,
290 appcache_service)); 290 appcache_service));
291 // Add interstitial page while merge session process (cookie 291 // Add interstitial page while merge session process (cookie
292 // reconstruction from OAuth2 refresh token in ChromeOS login) is still in 292 // reconstruction from OAuth2 refresh token in ChromeOS login) is still in
293 // progress while we are attempting to load a google property. 293 // progress while we are attempting to load a google property.
294 throttles->push_back(new MergeSessionThrottle(request)); 294 if (!MergeSessionThrottle::AreAllSessionMergedAlready() &&
295 request->url().SchemeIsHTTPOrHTTPS()) {
296 throttles->push_back(new MergeSessionThrottle(request));
297 }
295 } 298 }
296 #endif 299 #endif
297 300
298 // Don't attempt to append headers to requests that have already started. 301 // Don't attempt to append headers to requests that have already started.
299 // TODO(stevet): Remove this once the request ordering issues are resolved 302 // TODO(stevet): Remove this once the request ordering issues are resolved
300 // in crbug.com/128048. 303 // in crbug.com/128048.
301 if (!request->is_pending()) { 304 if (!request->is_pending()) {
302 net::HttpRequestHeaders headers; 305 net::HttpRequestHeaders headers;
303 headers.CopyFrom(request->extra_request_headers()); 306 headers.CopyFrom(request->extra_request_headers());
304 bool incognito = io_data->is_incognito(); 307 bool incognito = io_data->is_incognito();
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 if (!prerender::PrerenderManager::DoesURLHaveValidScheme(redirect_url) && 645 if (!prerender::PrerenderManager::DoesURLHaveValidScheme(redirect_url) &&
643 ResourceRequestInfo::ForRequest(request)->GetAssociatedRenderView( 646 ResourceRequestInfo::ForRequest(request)->GetAssociatedRenderView(
644 &child_id, &route_id) && 647 &child_id, &route_id) &&
645 prerender_tracker_->IsPrerenderingOnIOThread(child_id, route_id)) { 648 prerender_tracker_->IsPrerenderingOnIOThread(child_id, route_id)) {
646 ReportUnsupportedPrerenderScheme(redirect_url); 649 ReportUnsupportedPrerenderScheme(redirect_url);
647 prerender_tracker_->TryCancel( 650 prerender_tracker_->TryCancel(
648 child_id, route_id, prerender::FINAL_STATUS_UNSUPPORTED_SCHEME); 651 child_id, route_id, prerender::FINAL_STATUS_UNSUPPORTED_SCHEME);
649 request->Cancel(); 652 request->Cancel();
650 } 653 }
651 } 654 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698