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

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

Issue 2182633007: Avoid using ContentBrowserClient::IsIllegalOrigin in ResourceDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the IsIllegalOrigin function from ContentBrowserClient Created 4 years, 4 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 resource_dispatcher_host_delegate_.reset( 936 resource_dispatcher_host_delegate_.reset(
937 new ChromeResourceDispatcherHostDelegate); 937 new ChromeResourceDispatcherHostDelegate);
938 ResourceDispatcherHost::Get()->SetDelegate( 938 ResourceDispatcherHost::Get()->SetDelegate(
939 resource_dispatcher_host_delegate_.get()); 939 resource_dispatcher_host_delegate_.get());
940 940
941 pref_change_registrar_.Add( 941 pref_change_registrar_.Add(
942 prefs::kAllowCrossOriginAuthPrompt, 942 prefs::kAllowCrossOriginAuthPrompt,
943 base::Bind(&BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy, 943 base::Bind(&BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy,
944 base::Unretained(this))); 944 base::Unretained(this)));
945 ApplyAllowCrossOriginAuthPromptPolicy(); 945 ApplyAllowCrossOriginAuthPromptPolicy();
946 #if defined(ENABLE_EXTENSIONS)
947 content::ResourceDispatcherHost::Get()->AddSchemeForAccessCheck(
948 extensions::kExtensionScheme);
949 #endif
950
946 } 951 }
947 952
948 void BrowserProcessImpl::OnKeepAliveStateChanged(bool is_keeping_alive) { 953 void BrowserProcessImpl::OnKeepAliveStateChanged(bool is_keeping_alive) {
949 if (is_keeping_alive) 954 if (is_keeping_alive)
950 Pin(); 955 Pin();
951 else 956 else
952 Unpin(); 957 Unpin();
953 } 958 }
954 959
955 void BrowserProcessImpl::OnKeepAliveRestartStateChanged(bool can_restart){ 960 void BrowserProcessImpl::OnKeepAliveRestartStateChanged(bool can_restart){
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 } 1342 }
1338 1343
1339 void BrowserProcessImpl::OnAutoupdateTimer() { 1344 void BrowserProcessImpl::OnAutoupdateTimer() {
1340 if (CanAutorestartForUpdate()) { 1345 if (CanAutorestartForUpdate()) {
1341 DLOG(WARNING) << "Detected update. Restarting browser."; 1346 DLOG(WARNING) << "Detected update. Restarting browser.";
1342 RestartBackgroundInstance(); 1347 RestartBackgroundInstance();
1343 } 1348 }
1344 } 1349 }
1345 1350
1346 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1351 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.h » ('j') | content/browser/loader/resource_dispatcher_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698