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

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

Issue 2676633006: media: Add a web preference to enable encrypted media (Closed)
Patch Set: use a new pref Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/media/encrypted_media_browsertest.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/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 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 } else if (!web_prefs->web_security_enabled && 2511 } else if (!web_prefs->web_security_enabled &&
2512 command_line->HasSwitch(switches::kDisableWebSecurity) && 2512 command_line->HasSwitch(switches::kDisableWebSecurity) &&
2513 !command_line->HasSwitch(switches::kUserDataDir)) { 2513 !command_line->HasSwitch(switches::kUserDataDir)) {
2514 LOG(ERROR) << "Web security may only be disabled if '--user-data-dir' is " 2514 LOG(ERROR) << "Web security may only be disabled if '--user-data-dir' is "
2515 "also specified."; 2515 "also specified.";
2516 web_prefs->web_security_enabled = true; 2516 web_prefs->web_security_enabled = true;
2517 } 2517 }
2518 2518
2519 if (!prefs->GetBoolean(prefs::kWebKitPluginsEnabled)) 2519 if (!prefs->GetBoolean(prefs::kWebKitPluginsEnabled))
2520 web_prefs->plugins_enabled = false; 2520 web_prefs->plugins_enabled = false;
2521 web_prefs->encrypted_media_enabled =
2522 prefs->GetBoolean(prefs::kWebKitEncryptedMediaEnabled);
2521 web_prefs->loads_images_automatically = 2523 web_prefs->loads_images_automatically =
2522 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically); 2524 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically);
2523 2525
2524 if (prefs->GetBoolean(prefs::kDisable3DAPIs)) 2526 if (prefs->GetBoolean(prefs::kDisable3DAPIs))
2525 web_prefs->experimental_webgl_enabled = false; 2527 web_prefs->experimental_webgl_enabled = false;
2526 2528
2527 web_prefs->allow_running_insecure_content = 2529 web_prefs->allow_running_insecure_content =
2528 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); 2530 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent);
2529 #if defined(OS_ANDROID) 2531 #if defined(OS_ANDROID)
2530 web_prefs->font_scale_factor = 2532 web_prefs->font_scale_factor =
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3430 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3432 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3431 return variations::GetVariationParamValue( 3433 return variations::GetVariationParamValue(
3432 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3434 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3433 } 3435 }
3434 3436
3435 //static 3437 //static
3436 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3438 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3437 const storage::QuotaSettings* settings) { 3439 const storage::QuotaSettings* settings) {
3438 g_default_quota_settings = settings; 3440 g_default_quota_settings = settings;
3439 } 3441 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698