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

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

Issue 12256046: Added interstitial page for merge session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #else 53 #else
54 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" 54 #include "third_party/protobuf/src/google/protobuf/repeated_field.h"
55 #endif 55 #endif
56 56
57 #if defined(OS_ANDROID) 57 #if defined(OS_ANDROID)
58 #include "components/navigation_interception/intercept_navigation_delegate.h" 58 #include "components/navigation_interception/intercept_navigation_delegate.h"
59 #endif 59 #endif
60 60
61 #if defined(OS_CHROMEOS) 61 #if defined(OS_CHROMEOS)
62 #include "chrome/browser/chromeos/extensions/file_browser_resource_throttle.h" 62 #include "chrome/browser/chromeos/extensions/file_browser_resource_throttle.h"
63 #include "chrome/browser/chromeos/login/merge_session_throttle.h"
63 // TODO(oshima): Enable this for other platforms. 64 // TODO(oshima): Enable this for other platforms.
64 #include "chrome/browser/renderer_host/offline_resource_throttle.h" 65 #include "chrome/browser/renderer_host/offline_resource_throttle.h"
65 #endif 66 #endif
66 67
67 using content::BrowserThread; 68 using content::BrowserThread;
68 using content::RenderViewHost; 69 using content::RenderViewHost;
69 using content::ResourceDispatcherHostLoginDelegate; 70 using content::ResourceDispatcherHostLoginDelegate;
70 using content::ResourceRequestInfo; 71 using content::ResourceRequestInfo;
71 72
72 namespace { 73 namespace {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 throttles->push_back( 156 throttles->push_back(
156 components::InterceptNavigationDelegate::CreateThrottleFor(request)); 157 components::InterceptNavigationDelegate::CreateThrottleFor(request));
157 } 158 }
158 #endif 159 #endif
159 #if defined(OS_CHROMEOS) 160 #if defined(OS_CHROMEOS)
160 if (resource_type == ResourceType::MAIN_FRAME) { 161 if (resource_type == ResourceType::MAIN_FRAME) {
161 // We check offline first, then check safe browsing so that we still can 162 // We check offline first, then check safe browsing so that we still can
162 // block unsafe site after we remove offline page. 163 // block unsafe site after we remove offline page.
163 throttles->push_back(new OfflineResourceThrottle( 164 throttles->push_back(new OfflineResourceThrottle(
164 child_id, route_id, request, appcache_service)); 165 child_id, route_id, request, appcache_service));
166 // Add interstitial page while merge session process (cookie
167 // reconstruction from OAuth2 refresh token in ChromeOS login) is still in
168 // progress while we are attempting to load a google property.
169 throttles->push_back(new MergeSessionThrottle(
170 child_id, route_id, request));
165 } 171 }
166 #endif 172 #endif
167 173
168 // Don't attempt to append headers to requests that have already started. 174 // Don't attempt to append headers to requests that have already started.
169 // TODO(stevet): Remove this once the request ordering issues are resolved 175 // TODO(stevet): Remove this once the request ordering issues are resolved
170 // in crbug.com/128048. 176 // in crbug.com/128048.
171 if (!request->is_pending()) { 177 if (!request->is_pending()) {
172 net::HttpRequestHeaders headers; 178 net::HttpRequestHeaders headers;
173 headers.CopyFrom(request->extra_request_headers()); 179 headers.CopyFrom(request->extra_request_headers());
174 ProfileIOData* io_data = ProfileIOData::FromResourceContext( 180 ProfileIOData* io_data = ProfileIOData::FromResourceContext(
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data, 453 OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data,
448 info->GetChildID(), 454 info->GetChildID(),
449 info->GetRouteID()); 455 info->GetRouteID());
450 #endif 456 #endif
451 457
452 if (io_data->resource_prefetch_predictor_observer()) { 458 if (io_data->resource_prefetch_predictor_observer()) {
453 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( 459 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected(
454 redirect_url, request); 460 redirect_url, request);
455 } 461 }
456 } 462 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | chrome/browser/resources/chromeos/merge_session_load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698