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/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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 #include "content/public/browser/storage_partition.h" | 171 #include "content/public/browser/storage_partition.h" |
172 #include "content/public/browser/vpn_service_proxy.h" | 172 #include "content/public/browser/vpn_service_proxy.h" |
173 #include "content/public/browser/web_contents.h" | 173 #include "content/public/browser/web_contents.h" |
174 #include "content/public/common/child_process_host.h" | 174 #include "content/public/common/child_process_host.h" |
175 #include "content/public/common/content_descriptors.h" | 175 #include "content/public/common/content_descriptors.h" |
176 #include "content/public/common/content_features.h" | 176 #include "content/public/common/content_features.h" |
177 #include "content/public/common/content_switches.h" | 177 #include "content/public/common/content_switches.h" |
178 #include "content/public/common/sandbox_type.h" | 178 #include "content/public/common/sandbox_type.h" |
179 #include "content/public/common/service_manager_connection.h" | 179 #include "content/public/common/service_manager_connection.h" |
180 #include "content/public/common/service_names.mojom.h" | 180 #include "content/public/common/service_names.mojom.h" |
| 181 #include "content/public/common/url_constants.h" |
181 #include "content/public/common/url_utils.h" | 182 #include "content/public/common/url_utils.h" |
182 #include "content/public/common/web_preferences.h" | 183 #include "content/public/common/web_preferences.h" |
183 #include "device/bluetooth/adapter_factory.h" | 184 #include "device/bluetooth/adapter_factory.h" |
184 #include "device/bluetooth/public/interfaces/adapter.mojom.h" | 185 #include "device/bluetooth/public/interfaces/adapter.mojom.h" |
185 #include "device/usb/public/interfaces/chooser_service.mojom.h" | 186 #include "device/usb/public/interfaces/chooser_service.mojom.h" |
186 #include "device/usb/public/interfaces/device_manager.mojom.h" | 187 #include "device/usb/public/interfaces/device_manager.mojom.h" |
187 #include "extensions/features/features.h" | 188 #include "extensions/features/features.h" |
188 #include "gpu/config/gpu_switches.h" | 189 #include "gpu/config/gpu_switches.h" |
189 #include "media/audio/audio_manager.h" | 190 #include "media/audio/audio_manager.h" |
190 #include "media/media_features.h" | 191 #include "media/media_features.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 browser_context, *url)) | 646 browser_context, *url)) |
646 return false; | 647 return false; |
647 | 648 |
648 #if defined(OS_CHROMEOS) | 649 #if defined(OS_CHROMEOS) |
649 // Special case : in ChromeOS in Guest mode bookmarks and history are | 650 // Special case : in ChromeOS in Guest mode bookmarks and history are |
650 // disabled for security reasons. New tab page explains the reasons, so | 651 // disabled for security reasons. New tab page explains the reasons, so |
651 // we redirect user to new tab page. | 652 // we redirect user to new tab page. |
652 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) { | 653 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) { |
653 if (url->SchemeIs(content::kChromeUIScheme) && | 654 if (url->SchemeIs(content::kChromeUIScheme) && |
654 (url->DomainIs(chrome::kChromeUIBookmarksHost) || | 655 (url->DomainIs(chrome::kChromeUIBookmarksHost) || |
655 url->DomainIs(chrome::kChromeUIHistoryHost))) { | 656 url->DomainIs(content::kChromeUIHistoryHost))) { |
656 // Rewrite with new tab URL | 657 // Rewrite with new tab URL |
657 *url = GURL(chrome::kChromeUINewTabURL); | 658 *url = GURL(chrome::kChromeUINewTabURL); |
658 } | 659 } |
659 } | 660 } |
660 #endif | 661 #endif |
661 | 662 |
662 return true; | 663 return true; |
663 } | 664 } |
664 | 665 |
665 // Reverse URL handler for Web UI. Maps "chrome://chrome/foo/" to | 666 // Reverse URL handler for Web UI. Maps "chrome://chrome/foo/" to |
(...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3554 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3555 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3555 return variations::GetVariationParamValue( | 3556 return variations::GetVariationParamValue( |
3556 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3557 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3557 } | 3558 } |
3558 | 3559 |
3559 // static | 3560 // static |
3560 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3561 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3561 const storage::QuotaSettings* settings) { | 3562 const storage::QuotaSettings* settings) { |
3562 g_default_quota_settings = settings; | 3563 g_default_quota_settings = settings; |
3563 } | 3564 } |
OLD | NEW |