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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 #include "ppapi/features/features.h" | 201 #include "ppapi/features/features.h" |
202 #include "ppapi/host/ppapi_host.h" | 202 #include "ppapi/host/ppapi_host.h" |
203 #include "printing/features/features.h" | 203 #include "printing/features/features.h" |
204 #include "services/preferences/public/interfaces/preferences.mojom.h" | 204 #include "services/preferences/public/interfaces/preferences.mojom.h" |
205 #include "services/service_manager/public/cpp/binder_registry.h" | 205 #include "services/service_manager/public/cpp/binder_registry.h" |
206 #include "services/service_manager/public/cpp/interface_provider.h" | 206 #include "services/service_manager/public/cpp/interface_provider.h" |
207 #include "services/service_manager/public/cpp/service.h" | 207 #include "services/service_manager/public/cpp/service.h" |
208 #include "storage/browser/fileapi/external_mount_points.h" | 208 #include "storage/browser/fileapi/external_mount_points.h" |
209 #include "third_party/WebKit/public/platform/modules/installedapp/installed_app_ provider.mojom.h" | 209 #include "third_party/WebKit/public/platform/modules/installedapp/installed_app_ provider.mojom.h" |
210 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" | 210 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" |
211 #include "third_party/WebKit/public/web/WebDataSaverFlag.h" | |
211 #include "ui/base/l10n/l10n_util.h" | 212 #include "ui/base/l10n/l10n_util.h" |
212 #include "ui/base/resource/resource_bundle.h" | 213 #include "ui/base/resource/resource_bundle.h" |
213 #include "ui/resources/grit/ui_resources.h" | 214 #include "ui/resources/grit/ui_resources.h" |
214 #include "url/gurl.h" | 215 #include "url/gurl.h" |
215 #include "url/origin.h" | 216 #include "url/origin.h" |
216 | 217 |
217 #if defined(OS_WIN) | 218 #if defined(OS_WIN) |
218 #include "base/strings/string_tokenizer.h" | 219 #include "base/strings/string_tokenizer.h" |
219 #include "chrome/browser/chrome_browser_main_win.h" | 220 #include "chrome/browser/chrome_browser_main_win.h" |
220 #include "chrome/browser/conflicts/module_database_win.h" | 221 #include "chrome/browser/conflicts/module_database_win.h" |
(...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2700 } | 2701 } |
2701 DCHECK(!web_prefs->default_encoding.empty()); | 2702 DCHECK(!web_prefs->default_encoding.empty()); |
2702 | 2703 |
2703 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 2704 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
2704 switches::kEnablePotentiallyAnnoyingSecurityFeatures)) { | 2705 switches::kEnablePotentiallyAnnoyingSecurityFeatures)) { |
2705 web_prefs->disable_reading_from_canvas = true; | 2706 web_prefs->disable_reading_from_canvas = true; |
2706 web_prefs->strict_mixed_content_checking = true; | 2707 web_prefs->strict_mixed_content_checking = true; |
2707 web_prefs->strict_powerful_feature_restrictions = true; | 2708 web_prefs->strict_powerful_feature_restrictions = true; |
2708 } | 2709 } |
2709 | 2710 |
2710 web_prefs->data_saver_enabled = GetDataSaverEnabledPref(prefs); | 2711 web_prefs->data_saver_flag = GetDataSaverEnabledPref(prefs) |
2712 ? blink::WebDataSaverFlag::kEnabled | |
2713 : blink::WebDataSaverFlag::kDisabled; | |
kinuko
2017/05/18 03:48:21
Ah sorry- I hadn't realized this change would prop
horo
2017/05/18 05:08:27
Are you saying "inconsistent"?
I can rename Chrome
| |
2711 | 2714 |
2712 #if defined(OS_ANDROID) | 2715 #if defined(OS_ANDROID) |
2713 content::WebContents* contents = | 2716 content::WebContents* contents = |
2714 content::WebContents::FromRenderViewHost(rvh); | 2717 content::WebContents::FromRenderViewHost(rvh); |
2715 if (contents) { | 2718 if (contents) { |
2716 TabAndroid* tab_android = TabAndroid::FromWebContents(contents); | 2719 TabAndroid* tab_android = TabAndroid::FromWebContents(contents); |
2717 if (tab_android) { | 2720 if (tab_android) { |
2718 web_prefs->embedded_media_experience_enabled = | 2721 web_prefs->embedded_media_experience_enabled = |
2719 tab_android->ShouldEnableEmbeddedMediaExperience(); | 2722 tab_android->ShouldEnableEmbeddedMediaExperience(); |
2720 | 2723 |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3609 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3612 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3610 return variations::GetVariationParamValue( | 3613 return variations::GetVariationParamValue( |
3611 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3614 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3612 } | 3615 } |
3613 | 3616 |
3614 // static | 3617 // static |
3615 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3618 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3616 const storage::QuotaSettings* settings) { | 3619 const storage::QuotaSettings* settings) { |
3617 g_default_quota_settings = settings; | 3620 g_default_quota_settings = settings; |
3618 } | 3621 } |
OLD | NEW |