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

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

Issue 2681383003: media: Add a web preference to enable encrypted media (Closed)
Patch Set: 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 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 } else if (!web_prefs->web_security_enabled && 2476 } else if (!web_prefs->web_security_enabled &&
2477 command_line->HasSwitch(switches::kDisableWebSecurity) && 2477 command_line->HasSwitch(switches::kDisableWebSecurity) &&
2478 !command_line->HasSwitch(switches::kUserDataDir)) { 2478 !command_line->HasSwitch(switches::kUserDataDir)) {
2479 LOG(ERROR) << "Web security may only be disabled if '--user-data-dir' is " 2479 LOG(ERROR) << "Web security may only be disabled if '--user-data-dir' is "
2480 "also specified."; 2480 "also specified.";
2481 web_prefs->web_security_enabled = true; 2481 web_prefs->web_security_enabled = true;
2482 } 2482 }
2483 2483
2484 if (!prefs->GetBoolean(prefs::kWebKitPluginsEnabled)) 2484 if (!prefs->GetBoolean(prefs::kWebKitPluginsEnabled))
2485 web_prefs->plugins_enabled = false; 2485 web_prefs->plugins_enabled = false;
2486 web_prefs->encrypted_media_enabled =
2487 prefs->GetBoolean(prefs::kWebKitEncryptedMediaEnabled);
2486 web_prefs->loads_images_automatically = 2488 web_prefs->loads_images_automatically =
2487 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically); 2489 prefs->GetBoolean(prefs::kWebKitLoadsImagesAutomatically);
2488 2490
2489 if (prefs->GetBoolean(prefs::kDisable3DAPIs)) 2491 if (prefs->GetBoolean(prefs::kDisable3DAPIs))
2490 web_prefs->experimental_webgl_enabled = false; 2492 web_prefs->experimental_webgl_enabled = false;
2491 2493
2492 web_prefs->allow_running_insecure_content = 2494 web_prefs->allow_running_insecure_content =
2493 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); 2495 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent);
2494 #if defined(OS_ANDROID) 2496 #if defined(OS_ANDROID)
2495 web_prefs->font_scale_factor = 2497 web_prefs->font_scale_factor =
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
3392 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { 3394 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() {
3393 return variations::GetVariationParamValue( 3395 return variations::GetVariationParamValue(
3394 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; 3396 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true";
3395 } 3397 }
3396 3398
3397 bool ChromeContentBrowserClient:: 3399 bool ChromeContentBrowserClient::
3398 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3400 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3399 return variations::GetVariationParamValue( 3401 return variations::GetVariationParamValue(
3400 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3402 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3401 } 3403 }
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