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

Side by Side Diff: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc

Issue 2468723003: Move session service and supervised users to buildflags. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/lifetime/browser_close_manager.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/loader/chrome_resource_dispatcher_host_delegate.h" 5 #include "chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h" 84 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
85 #include "extensions/browser/extension_throttle_manager.h" 85 #include "extensions/browser/extension_throttle_manager.h"
86 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" 86 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
87 #include "extensions/browser/info_map.h" 87 #include "extensions/browser/info_map.h"
88 #include "extensions/common/constants.h" 88 #include "extensions/common/constants.h"
89 #include "extensions/common/extension_urls.h" 89 #include "extensions/common/extension_urls.h"
90 #include "extensions/common/manifest_handlers/mime_types_handler.h" 90 #include "extensions/common/manifest_handlers/mime_types_handler.h"
91 #include "extensions/common/user_script.h" 91 #include "extensions/common/user_script.h"
92 #endif 92 #endif
93 93
94 #if defined(ENABLE_SUPERVISED_USERS) 94 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
95 #include "chrome/browser/supervised_user/supervised_user_resource_throttle.h" 95 #include "chrome/browser/supervised_user/supervised_user_resource_throttle.h"
96 #endif 96 #endif
97 97
98 #if defined(USE_SYSTEM_PROTOBUF) 98 #if defined(USE_SYSTEM_PROTOBUF)
99 #include <google/protobuf/repeated_field.h> 99 #include <google/protobuf/repeated_field.h>
100 #else 100 #else
101 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" 101 #include "third_party/protobuf/src/google/protobuf/repeated_field.h"
102 #endif 102 #endif
103 103
104 #if defined(OS_ANDROID) 104 #if defined(OS_ANDROID)
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 #if defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE) 611 #if defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE)
612 if (!first_throttle && io_data->safe_browsing_enabled()->GetValue()) { 612 if (!first_throttle && io_data->safe_browsing_enabled()->GetValue()) {
613 first_throttle = SafeBrowsingResourceThrottle::MaybeCreate( 613 first_throttle = SafeBrowsingResourceThrottle::MaybeCreate(
614 request, resource_type, safe_browsing_.get()); 614 request, resource_type, safe_browsing_.get());
615 } 615 }
616 #endif // defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE) 616 #endif // defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE)
617 617
618 if (first_throttle) 618 if (first_throttle)
619 throttles->push_back(first_throttle); 619 throttles->push_back(first_throttle);
620 620
621 #if defined(ENABLE_SUPERVISED_USERS) 621 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
622 bool is_subresource_request = 622 bool is_subresource_request =
623 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; 623 resource_type != content::RESOURCE_TYPE_MAIN_FRAME;
624 throttles->push_back(new SupervisedUserResourceThrottle( 624 throttles->push_back(new SupervisedUserResourceThrottle(
625 request, !is_subresource_request, 625 request, !is_subresource_request,
626 io_data->supervised_user_url_filter())); 626 io_data->supervised_user_url_filter()));
627 #endif 627 #endif
628 628
629 #if defined(ENABLE_EXTENSIONS) 629 #if defined(ENABLE_EXTENSIONS)
630 content::ResourceThrottle* wait_for_extensions_init_throttle = 630 content::ResourceThrottle* wait_for_extensions_init_throttle =
631 user_script_listener_->CreateResourceThrottle(request->url(), 631 user_script_listener_->CreateResourceThrottle(request->url(),
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 base::Bind(&ChromeResourceDispatcherHostDelegate::OnAbortedFrameLoad, 878 base::Bind(&ChromeResourceDispatcherHostDelegate::OnAbortedFrameLoad,
879 base::Unretained(this), url, request_loading_time)); 879 base::Unretained(this), url, request_loading_time));
880 return; 880 return;
881 } 881 }
882 882
883 std::string metric_name = (request_loading_time.InMilliseconds() < 100 ? 883 std::string metric_name = (request_loading_time.InMilliseconds() < 100 ?
884 "Net.ErrAborted.Fast" : "Net.ErrAborted.Slow"); 884 "Net.ErrAborted.Fast" : "Net.ErrAborted.Slow");
885 rappor::SampleDomainAndRegistryFromGURL( 885 rappor::SampleDomainAndRegistryFromGURL(
886 g_browser_process->rappor_service(), metric_name, url); 886 g_browser_process->rappor_service(), metric_name, url);
887 } 887 }
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/browser_close_manager.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698