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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2776493005: Convert SupervisedUserResourceThrottle to a NavigationThrottle. (Closed)
Patch Set: Response to comments Created 3 years, 8 months 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 #endif 384 #endif
385 385
386 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 386 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
387 #include "media/mojo/services/media_service_factory.h" // nogncheck 387 #include "media/mojo/services/media_service_factory.h" // nogncheck
388 #endif 388 #endif
389 389
390 #if defined(OS_CHROMEOS) 390 #if defined(OS_CHROMEOS)
391 #include "chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h " 391 #include "chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h "
392 #endif 392 #endif
393 393
394 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
395 #include "chrome/browser/supervised_user/supervised_user_navigation_throttle.h"
396 #endif
397
394 using base::FileDescriptor; 398 using base::FileDescriptor;
395 using content::BrowserThread; 399 using content::BrowserThread;
396 using content::BrowserURLHandler; 400 using content::BrowserURLHandler;
397 using content::BrowsingDataFilterBuilder; 401 using content::BrowsingDataFilterBuilder;
398 using content::ChildProcessSecurityPolicy; 402 using content::ChildProcessSecurityPolicy;
399 using content::QuotaPermissionContext; 403 using content::QuotaPermissionContext;
400 using content::RenderFrameHost; 404 using content::RenderFrameHost;
401 using content::RenderViewHost; 405 using content::RenderViewHost;
402 using content::ResourceType; 406 using content::ResourceType;
403 using content::SiteInstance; 407 using content::SiteInstance;
(...skipping 2963 matching lines...) Expand 10 before | Expand all | Expand 10 after
3367 page_load_metrics::MetricsNavigationThrottle::Create(handle)); 3371 page_load_metrics::MetricsNavigationThrottle::Create(handle));
3368 } 3372 }
3369 3373
3370 #if BUILDFLAG(ENABLE_PLUGINS) 3374 #if BUILDFLAG(ENABLE_PLUGINS)
3371 std::unique_ptr<content::NavigationThrottle> flash_url_throttle = 3375 std::unique_ptr<content::NavigationThrottle> flash_url_throttle =
3372 FlashDownloadInterception::MaybeCreateThrottleFor(handle); 3376 FlashDownloadInterception::MaybeCreateThrottleFor(handle);
3373 if (flash_url_throttle) 3377 if (flash_url_throttle)
3374 throttles.push_back(std::move(flash_url_throttle)); 3378 throttles.push_back(std::move(flash_url_throttle));
3375 #endif 3379 #endif
3376 3380
3381 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
3382 std::unique_ptr<content::NavigationThrottle> supervised_user_throttle =
3383 SupervisedUserNavigationThrottle::MaybeCreateThrottleFor(handle);
3384 if (supervised_user_throttle)
3385 throttles.push_back(std::move(supervised_user_throttle));
3386 #endif
3387
3377 #if defined(OS_ANDROID) 3388 #if defined(OS_ANDROID)
3378 // TODO(davidben): This is insufficient to integrate with prerender properly. 3389 // TODO(davidben): This is insufficient to integrate with prerender properly.
3379 // https://crbug.com/370595 3390 // https://crbug.com/370595
3380 prerender::PrerenderContents* prerender_contents = 3391 prerender::PrerenderContents* prerender_contents =
3381 prerender::PrerenderContents::FromWebContents(handle->GetWebContents()); 3392 prerender::PrerenderContents::FromWebContents(handle->GetWebContents());
3382 if (!prerender_contents && handle->IsInMainFrame()) { 3393 if (!prerender_contents && handle->IsInMainFrame()) {
3383 throttles.push_back( 3394 throttles.push_back(
3384 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( 3395 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor(
3385 handle)); 3396 handle));
3386 } 3397 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
3571 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3582 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3572 return variations::GetVariationParamValue( 3583 return variations::GetVariationParamValue(
3573 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3584 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3574 } 3585 }
3575 3586
3576 // static 3587 // static
3577 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3588 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3578 const storage::QuotaSettings* settings) { 3589 const storage::QuotaSettings* settings) {
3579 g_default_quota_settings = settings; 3590 g_default_quota_settings = settings;
3580 } 3591 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698