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

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

Issue 11293017: Move navigation interception component to content/components (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add findbugs suppression for compatibility code. Created 8 years, 1 month 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 28 matching lines...) Expand all
39 #include "content/public/browser/resource_context.h" 39 #include "content/public/browser/resource_context.h"
40 #include "content/public/browser/resource_dispatcher_host.h" 40 #include "content/public/browser/resource_dispatcher_host.h"
41 #include "content/public/browser/resource_request_info.h" 41 #include "content/public/browser/resource_request_info.h"
42 #include "net/base/load_flags.h" 42 #include "net/base/load_flags.h"
43 #include "net/base/ssl_config_service.h" 43 #include "net/base/ssl_config_service.h"
44 #include "net/http/http_response_headers.h" 44 #include "net/http/http_response_headers.h"
45 #include "net/url_request/url_request.h" 45 #include "net/url_request/url_request.h"
46 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" 46 #include "third_party/protobuf/src/google/protobuf/repeated_field.h"
47 47
48 #if defined(OS_ANDROID) 48 #if defined(OS_ANDROID)
49 #include "chrome/browser/component/navigation_interception/intercept_navigation_ delegate.h" 49 #include "content/components/navigation_interception/intercept_navigation_delega te.h"
50 #endif 50 #endif
51 51
52 // TODO(oshima): Enable this for other platforms. 52 // TODO(oshima): Enable this for other platforms.
53 #if defined(OS_CHROMEOS) 53 #if defined(OS_CHROMEOS)
54 #include "chrome/browser/renderer_host/offline_resource_throttle.h" 54 #include "chrome/browser/renderer_host/offline_resource_throttle.h"
55 #endif 55 #endif
56 56
57 using content::BrowserThread; 57 using content::BrowserThread;
58 using content::RenderViewHost; 58 using content::RenderViewHost;
59 using content::ResourceDispatcherHostLoginDelegate; 59 using content::ResourceDispatcherHostLoginDelegate;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool is_prerendering = prerender_tracker_->IsPrerenderingOnIOThread( 137 bool is_prerendering = prerender_tracker_->IsPrerenderingOnIOThread(
138 child_id, route_id); 138 child_id, route_id);
139 if (is_prerendering) { 139 if (is_prerendering) {
140 user_data->set_is_prerender(true); 140 user_data->set_is_prerender(true);
141 request->set_priority(net::IDLE); 141 request->set_priority(net::IDLE);
142 } 142 }
143 143
144 #if defined(OS_ANDROID) 144 #if defined(OS_ANDROID)
145 if (!is_prerendering && resource_type == ResourceType::MAIN_FRAME) { 145 if (!is_prerendering && resource_type == ResourceType::MAIN_FRAME) {
146 throttles->push_back( 146 throttles->push_back(
147 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( 147 content::InterceptNavigationDelegate::CreateThrottleFor(
148 request)); 148 request));
149 } 149 }
150 #endif 150 #endif
151 #if defined(OS_CHROMEOS) 151 #if defined(OS_CHROMEOS)
152 if (resource_type == ResourceType::MAIN_FRAME) { 152 if (resource_type == ResourceType::MAIN_FRAME) {
153 // We check offline first, then check safe browsing so that we still can 153 // We check offline first, then check safe browsing so that we still can
154 // block unsafe site after we remove offline page. 154 // block unsafe site after we remove offline page.
155 throttles->push_back(new OfflineResourceThrottle( 155 throttles->push_back(new OfflineResourceThrottle(
156 child_id, route_id, request, appcache_service)); 156 child_id, route_id, request, appcache_service));
157 } 157 }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 if (base::Base64Encode(serialized, &hashed)) { 477 if (base::Base64Encode(serialized, &hashed)) {
478 // If successful, swap the header value with the new one. 478 // If successful, swap the header value with the new one.
479 // Note that the list of IDs and the header could be temporarily out of sync 479 // Note that the list of IDs and the header could be temporarily out of sync
480 // if IDs are added as the header is recreated. The receiving servers are OK 480 // if IDs are added as the header is recreated. The receiving servers are OK
481 // with such descrepancies. 481 // with such descrepancies.
482 variation_ids_header_ = hashed; 482 variation_ids_header_ = hashed;
483 } else { 483 } else {
484 DVLOG(1) << "Failed to base64 encode Variation IDs value: " << serialized; 484 DVLOG(1) << "Failed to base64 encode Variation IDs value: " << serialized;
485 } 485 }
486 } 486 }
OLDNEW
« no previous file with comments | « chrome/browser/component/navigation_interception/navigation_interception.gypi ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698