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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 2576663004: content::ResourceType clean up (Closed)
Patch Set: Rebase Created 4 years 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
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/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
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 "content/public/common/resource_type.h"
51 #include "extensions/features/features.h" 52 #include "extensions/features/features.h"
52 #include "net/base/host_port_pair.h" 53 #include "net/base/host_port_pair.h"
53 #include "net/base/load_flags.h" 54 #include "net/base/load_flags.h"
54 #include "net/base/net_errors.h" 55 #include "net/base/net_errors.h"
55 #include "net/cookies/canonical_cookie.h" 56 #include "net/cookies/canonical_cookie.h"
56 #include "net/cookies/cookie_options.h" 57 #include "net/cookies/cookie_options.h"
57 #include "net/http/http_request_headers.h" 58 #include "net/http/http_request_headers.h"
58 #include "net/http/http_response_headers.h" 59 #include "net/http/http_response_headers.h"
59 #include "net/http/http_status_code.h" 60 #include "net/http/http_status_code.h"
60 #include "net/log/net_log.h" 61 #include "net/log/net_log.h"
(...skipping 11 matching lines...) Expand all
72 #include "chrome/common/chrome_switches.h" 73 #include "chrome/common/chrome_switches.h"
73 #endif 74 #endif
74 75
75 #if BUILDFLAG(ENABLE_EXTENSIONS) 76 #if BUILDFLAG(ENABLE_EXTENSIONS)
76 #include "extensions/common/constants.h" 77 #include "extensions/common/constants.h"
77 #endif 78 #endif
78 79
79 using content::BrowserThread; 80 using content::BrowserThread;
80 using content::RenderViewHost; 81 using content::RenderViewHost;
81 using content::ResourceRequestInfo; 82 using content::ResourceRequestInfo;
82 using content::ResourceType;
83 83
84 // 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
85 // Android. 85 // Android.
86 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) 86 #if defined(OS_CHROMEOS) || defined(OS_ANDROID)
87 bool ChromeNetworkDelegate::g_allow_file_access_ = false; 87 bool ChromeNetworkDelegate::g_allow_file_access_ = false;
88 #else 88 #else
89 bool ChromeNetworkDelegate::g_allow_file_access_ = true; 89 bool ChromeNetworkDelegate::g_allow_file_access_ = true;
90 #endif 90 #endif
91 91
92 namespace { 92 namespace {
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 if (!data_use_aggregator_) 577 if (!data_use_aggregator_)
578 return; 578 return;
579 579
580 if (is_data_usage_off_the_record_) { 580 if (is_data_usage_off_the_record_) {
581 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); 581 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes);
582 return; 582 return;
583 } 583 }
584 584
585 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); 585 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes);
586 } 586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698