| 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/net/chrome_network_delegate.h" | 5 #include "chrome/browser/net/chrome_network_delegate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "chrome/common/chrome_switches.h" | 68 #include "chrome/common/chrome_switches.h" |
| 69 #endif | 69 #endif |
| 70 | 70 |
| 71 #if defined(ENABLE_CONFIGURATION_POLICY) | 71 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 72 #include "components/policy/core/browser/url_blacklist_manager.h" | 72 #include "components/policy/core/browser/url_blacklist_manager.h" |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 using content::BrowserThread; | 75 using content::BrowserThread; |
| 76 using content::RenderViewHost; | 76 using content::RenderViewHost; |
| 77 using content::ResourceRequestInfo; | 77 using content::ResourceRequestInfo; |
| 78 using content::ResourceType; |
| 78 | 79 |
| 79 // By default we don't allow access to all file:// urls on ChromeOS and | 80 // By default we don't allow access to all file:// urls on ChromeOS and |
| 80 // Android. | 81 // Android. |
| 81 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 82 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 82 bool ChromeNetworkDelegate::g_allow_file_access_ = false; | 83 bool ChromeNetworkDelegate::g_allow_file_access_ = false; |
| 83 #else | 84 #else |
| 84 bool ChromeNetworkDelegate::g_allow_file_access_ = true; | 85 bool ChromeNetworkDelegate::g_allow_file_access_ = true; |
| 85 #endif | 86 #endif |
| 86 | 87 |
| 87 // This remains false unless the --disable-extensions-http-throttling | 88 // This remains false unless the --disable-extensions-http-throttling |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 data_reduction_proxy::DataReductionProxyRequestType request_type) { | 825 data_reduction_proxy::DataReductionProxyRequestType request_type) { |
| 825 DCHECK_GE(received_content_length, 0); | 826 DCHECK_GE(received_content_length, 0); |
| 826 DCHECK_GE(original_content_length, 0); | 827 DCHECK_GE(original_content_length, 0); |
| 827 StoreAccumulatedContentLength(received_content_length, | 828 StoreAccumulatedContentLength(received_content_length, |
| 828 original_content_length, | 829 original_content_length, |
| 829 request_type, | 830 request_type, |
| 830 reinterpret_cast<Profile*>(profile_)); | 831 reinterpret_cast<Profile*>(profile_)); |
| 831 received_content_length_ += received_content_length; | 832 received_content_length_ += received_content_length; |
| 832 original_content_length_ += original_content_length; | 833 original_content_length_ += original_content_length; |
| 833 } | 834 } |
| OLD | NEW |