OLD | NEW |
---|---|
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 26 matching lines...) Expand all Loading... | |
37 #include "content/public/browser/notification_service.h" | 37 #include "content/public/browser/notification_service.h" |
38 #include "content/public/browser/render_view_host.h" | 38 #include "content/public/browser/render_view_host.h" |
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 | 46 |
47 #if defined(ENABLE_MANAGED_USERS) | |
48 #include "chrome/browser/managed_mode/managed_mode_resource_throttle.h" | |
49 #endif | |
50 | |
47 #if defined(USE_SYSTEM_PROTOBUF) | 51 #if defined(USE_SYSTEM_PROTOBUF) |
48 #include <google/protobuf/repeated_field.h> | 52 #include <google/protobuf/repeated_field.h> |
49 #else | 53 #else |
50 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 54 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
51 #endif | 55 #endif |
52 | 56 |
53 #if defined(OS_ANDROID) | 57 #if defined(OS_ANDROID) |
54 #include "content/components/navigation_interception/intercept_navigation_delega te.h" | 58 #include "content/components/navigation_interception/intercept_navigation_delega te.h" |
55 #else | |
56 #include "chrome/browser/managed_mode/managed_mode_resource_throttle.h" | |
57 #endif | 59 #endif |
58 | 60 |
59 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
60 #include "chrome/browser/chromeos/extensions/file_browser_resource_throttle.h" | 62 #include "chrome/browser/chromeos/extensions/file_browser_resource_throttle.h" |
61 // TODO(oshima): Enable this for other platforms. | 63 // TODO(oshima): Enable this for other platforms. |
62 #include "chrome/browser/renderer_host/offline_resource_throttle.h" | 64 #include "chrome/browser/renderer_host/offline_resource_throttle.h" |
63 #endif | 65 #endif |
64 | 66 |
65 using content::BrowserThread; | 67 using content::BrowserThread; |
66 using content::RenderViewHost; | 68 using content::RenderViewHost; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 if (io_data->safe_browsing_enabled()->GetValue()) { | 320 if (io_data->safe_browsing_enabled()->GetValue()) { |
319 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME; | 321 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME; |
320 content::ResourceThrottle* throttle = | 322 content::ResourceThrottle* throttle = |
321 SafeBrowsingResourceThrottleFactory::Create(request, child_id, route_id, | 323 SafeBrowsingResourceThrottleFactory::Create(request, child_id, route_id, |
322 is_subresource_request, safe_browsing_); | 324 is_subresource_request, safe_browsing_); |
323 if (throttle) | 325 if (throttle) |
324 throttles->push_back(throttle); | 326 throttles->push_back(throttle); |
325 } | 327 } |
326 #endif | 328 #endif |
327 | 329 |
328 #if !defined(OS_ANDROID) | 330 #if defined(ENABLE_MANAGED_USERS) |
329 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME; | 331 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME; |
330 throttles->push_back(new ManagedModeResourceThrottle( | 332 throttles->push_back(new ManagedModeResourceThrottle( |
331 request, child_id, route_id, !is_subresource_request)); | 333 request, child_id, route_id, !is_subresource_request, |
334 io_data->managed_mode_url_filter())); | |
not at google - send to devlin
2013/02/01 19:35:50
This broke compile with safe_browsing==0 since io_
| |
332 #endif | 335 #endif |
333 | 336 |
334 content::ResourceThrottle* throttle = | 337 content::ResourceThrottle* throttle = |
335 user_script_listener_->CreateResourceThrottle(request->url(), | 338 user_script_listener_->CreateResourceThrottle(request->url(), |
336 resource_type); | 339 resource_type); |
337 if (throttle) | 340 if (throttle) |
338 throttles->push_back(throttle); | 341 throttles->push_back(throttle); |
339 } | 342 } |
340 | 343 |
341 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 344 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
440 OneClickSigninHelper::ShowInfoBarIfPossible(request, info->GetChildID(), | 443 OneClickSigninHelper::ShowInfoBarIfPossible(request, info->GetChildID(), |
441 info->GetRouteID()); | 444 info->GetRouteID()); |
442 #endif | 445 #endif |
443 | 446 |
444 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); | 447 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); |
445 if (io_data->resource_prefetch_predictor_observer()) { | 448 if (io_data->resource_prefetch_predictor_observer()) { |
446 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( | 449 io_data->resource_prefetch_predictor_observer()->OnRequestRedirected( |
447 redirect_url, request); | 450 redirect_url, request); |
448 } | 451 } |
449 } | 452 } |
OLD | NEW |