| 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> |
| 11 | 11 |
| 12 #include "base/base_paths.h" | 12 #include "base/base_paths.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/debug/alias.h" | 14 #include "base/debug/alias.h" |
| 15 #include "base/debug/dump_without_crashing.h" | 15 #include "base/debug/dump_without_crashing.h" |
| 16 #include "base/debug/stack_trace.h" | 16 #include "base/debug/stack_trace.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "base/metrics/field_trial.h" | 19 #include "base/metrics/field_trial.h" |
| 20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 21 #include "base/metrics/sparse_histogram.h" | 21 #include "base/metrics/sparse_histogram.h" |
| 22 #include "base/metrics/user_metrics.h" | 22 #include "base/metrics/user_metrics.h" |
| 23 #include "base/path_service.h" | 23 #include "base/path_service.h" |
| 24 #include "base/prefs/pref_member.h" | |
| 25 #include "base/prefs/pref_service.h" | |
| 26 #include "base/profiler/scoped_tracker.h" | 24 #include "base/profiler/scoped_tracker.h" |
| 27 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
| 28 #include "base/strings/string_util.h" | 26 #include "base/strings/string_util.h" |
| 29 #include "base/time/time.h" | 27 #include "base/time/time.h" |
| 30 #include "build/build_config.h" | 28 #include "build/build_config.h" |
| 31 #include "chrome/browser/browser_process.h" | 29 #include "chrome/browser/browser_process.h" |
| 32 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 30 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 33 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 31 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 34 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 32 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 35 #include "chrome/browser/net/chrome_extensions_network_delegate.h" | 33 #include "chrome/browser/net/chrome_extensions_network_delegate.h" |
| 36 #include "chrome/browser/net/connect_interceptor.h" | 34 #include "chrome/browser/net/connect_interceptor.h" |
| 37 #include "chrome/browser/net/request_source_bandwidth_histograms.h" | 35 #include "chrome/browser/net/request_source_bandwidth_histograms.h" |
| 38 #include "chrome/browser/net/safe_search_util.h" | 36 #include "chrome/browser/net/safe_search_util.h" |
| 39 #include "chrome/browser/profiles/profile_manager.h" | 37 #include "chrome/browser/profiles/profile_manager.h" |
| 40 #include "chrome/browser/task_management/task_manager_interface.h" | 38 #include "chrome/browser/task_management/task_manager_interface.h" |
| 41 #include "chrome/common/chrome_constants.h" | 39 #include "chrome/common/chrome_constants.h" |
| 42 #include "chrome/common/features.h" | 40 #include "chrome/common/features.h" |
| 43 #include "chrome/common/pref_names.h" | 41 #include "chrome/common/pref_names.h" |
| 44 #include "components/content_settings/core/browser/cookie_settings.h" | 42 #include "components/content_settings/core/browser/cookie_settings.h" |
| 45 #include "components/data_usage/core/data_use_aggregator.h" | 43 #include "components/data_usage/core/data_use_aggregator.h" |
| 46 #include "components/domain_reliability/monitor.h" | 44 #include "components/domain_reliability/monitor.h" |
| 45 #include "components/prefs/pref_member.h" |
| 46 #include "components/prefs/pref_service.h" |
| 47 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
| 48 #include "content/public/browser/render_frame_host.h" | 48 #include "content/public/browser/render_frame_host.h" |
| 49 #include "content/public/browser/render_view_host.h" | 49 #include "content/public/browser/render_view_host.h" |
| 50 #include "content/public/browser/resource_request_info.h" | 50 #include "content/public/browser/resource_request_info.h" |
| 51 #include "content/public/common/content_switches.h" | 51 #include "content/public/common/content_switches.h" |
| 52 #include "content/public/common/process_type.h" | 52 #include "content/public/common/process_type.h" |
| 53 #include "net/base/host_port_pair.h" | 53 #include "net/base/host_port_pair.h" |
| 54 #include "net/base/load_flags.h" | 54 #include "net/base/load_flags.h" |
| 55 #include "net/base/net_errors.h" | 55 #include "net/base/net_errors.h" |
| 56 #include "net/cookies/canonical_cookie.h" | 56 #include "net/cookies/canonical_cookie.h" |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 if (!data_use_aggregator_) | 752 if (!data_use_aggregator_) |
| 753 return; | 753 return; |
| 754 | 754 |
| 755 if (is_data_usage_off_the_record_) { | 755 if (is_data_usage_off_the_record_) { |
| 756 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); | 756 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); |
| 757 return; | 757 return; |
| 758 } | 758 } |
| 759 | 759 |
| 760 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); | 760 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); |
| 761 } | 761 } |
| OLD | NEW |