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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "components/domain_reliability/monitor.h" | 41 #include "components/domain_reliability/monitor.h" |
42 #include "components/policy/core/browser/url_blacklist_manager.h" | 42 #include "components/policy/core/browser/url_blacklist_manager.h" |
43 #include "components/prefs/pref_member.h" | 43 #include "components/prefs/pref_member.h" |
44 #include "components/prefs/pref_service.h" | 44 #include "components/prefs/pref_service.h" |
45 #include "content/public/browser/browser_thread.h" | 45 #include "content/public/browser/browser_thread.h" |
46 #include "content/public/browser/render_frame_host.h" | 46 #include "content/public/browser/render_frame_host.h" |
47 #include "content/public/browser/render_view_host.h" | 47 #include "content/public/browser/render_view_host.h" |
48 #include "content/public/browser/resource_request_info.h" | 48 #include "content/public/browser/resource_request_info.h" |
49 #include "content/public/common/content_switches.h" | 49 #include "content/public/common/content_switches.h" |
50 #include "content/public/common/process_type.h" | 50 #include "content/public/common/process_type.h" |
| 51 #include "extensions/features/features.h" |
51 #include "net/base/host_port_pair.h" | 52 #include "net/base/host_port_pair.h" |
52 #include "net/base/load_flags.h" | 53 #include "net/base/load_flags.h" |
53 #include "net/base/net_errors.h" | 54 #include "net/base/net_errors.h" |
54 #include "net/cookies/canonical_cookie.h" | 55 #include "net/cookies/canonical_cookie.h" |
55 #include "net/cookies/cookie_options.h" | 56 #include "net/cookies/cookie_options.h" |
56 #include "net/http/http_request_headers.h" | 57 #include "net/http/http_request_headers.h" |
57 #include "net/http/http_response_headers.h" | 58 #include "net/http/http_response_headers.h" |
58 #include "net/http/http_status_code.h" | 59 #include "net/http/http_status_code.h" |
59 #include "net/log/net_log.h" | 60 #include "net/log/net_log.h" |
60 #include "net/log/net_log_event_type.h" | 61 #include "net/log/net_log_event_type.h" |
61 #include "net/log/net_log_with_source.h" | 62 #include "net/log/net_log_with_source.h" |
62 #include "net/url_request/url_request.h" | 63 #include "net/url_request/url_request.h" |
63 | 64 |
64 #if BUILDFLAG(ANDROID_JAVA_UI) | 65 #if BUILDFLAG(ANDROID_JAVA_UI) |
65 #include "chrome/browser/io_thread.h" | 66 #include "chrome/browser/io_thread.h" |
66 #include "chrome/browser/precache/precache_util.h" | 67 #include "chrome/browser/precache/precache_util.h" |
67 #endif | 68 #endif |
68 | 69 |
69 #if defined(OS_CHROMEOS) | 70 #if defined(OS_CHROMEOS) |
70 #include "base/sys_info.h" | 71 #include "base/sys_info.h" |
71 #include "chrome/common/chrome_switches.h" | 72 #include "chrome/common/chrome_switches.h" |
72 #endif | 73 #endif |
73 | 74 |
74 #if defined(ENABLE_EXTENSIONS) | 75 #if BUILDFLAG(ENABLE_EXTENSIONS) |
75 #include "extensions/common/constants.h" | 76 #include "extensions/common/constants.h" |
76 #endif | 77 #endif |
77 | 78 |
78 using content::BrowserThread; | 79 using content::BrowserThread; |
79 using content::RenderViewHost; | 80 using content::RenderViewHost; |
80 using content::ResourceRequestInfo; | 81 using content::ResourceRequestInfo; |
81 using content::ResourceType; | 82 using content::ResourceType; |
82 | 83 |
83 // By default we don't allow access to all file:// urls on ChromeOS and | 84 // By default we don't allow access to all file:// urls on ChromeOS and |
84 // Android. | 85 // Android. |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 if (!data_use_aggregator_) | 584 if (!data_use_aggregator_) |
584 return; | 585 return; |
585 | 586 |
586 if (is_data_usage_off_the_record_) { | 587 if (is_data_usage_off_the_record_) { |
587 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); | 588 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); |
588 return; | 589 return; |
589 } | 590 } |
590 | 591 |
591 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); | 592 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); |
592 } | 593 } |
OLD | NEW |