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

Side by Side Diff: chrome/browser/android/chrome_startup_flags.cc

Issue 12026010: Add GOOGLE_TV build tag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased and remove empry line Created 7 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 | « build/common.gypi ('k') | no next file » | 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 <jni.h> 5 #include <jni.h>
6 6
7 #include "chrome/browser/android/chrome_startup_flags.h" 7 #include "chrome/browser/android/chrome_startup_flags.h"
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "media/base/media_switches.h"
15 16
16 namespace { 17 namespace {
17 18
18 void SetCommandLineSwitch(const std::string& switch_string) { 19 void SetCommandLineSwitch(const std::string& switch_string) {
19 CommandLine* command_line = CommandLine::ForCurrentProcess(); 20 CommandLine* command_line = CommandLine::ForCurrentProcess();
20 if (!command_line->HasSwitch(switch_string)) 21 if (!command_line->HasSwitch(switch_string))
21 command_line->AppendSwitch(switch_string); 22 command_line->AppendSwitch(switch_string);
22 } 23 }
23 24
24 void SetCommandLineSwitchASCII(const std::string& switch_string, 25 void SetCommandLineSwitchASCII(const std::string& switch_string,
25 const std::string& value) { 26 const std::string& value) {
26 CommandLine* command_line = CommandLine::ForCurrentProcess(); 27 CommandLine* command_line = CommandLine::ForCurrentProcess();
27 if (!command_line->HasSwitch(switch_string)) 28 if (!command_line->HasSwitch(switch_string))
28 command_line->AppendSwitchASCII(switch_string, value); 29 command_line->AppendSwitchASCII(switch_string, value);
29 } 30 }
30 31
31 } // namespace 32 } // namespace
32 33
33 void SetChromeSpecificCommandLineFlags() { 34 void SetChromeSpecificCommandLineFlags() {
34 // Turn on autologin. 35 // Turn on autologin.
35 SetCommandLineSwitch(switches::kEnableAutologin); 36 SetCommandLineSwitch(switches::kEnableAutologin);
36 37
37 // Enable prerender for the omnibox. 38 // Enable prerender for the omnibox.
38 SetCommandLineSwitchASCII( 39 SetCommandLineSwitchASCII(
39 switches::kPrerenderMode, switches::kPrerenderModeSwitchValueEnabled); 40 switches::kPrerenderMode, switches::kPrerenderModeSwitchValueEnabled);
40 SetCommandLineSwitchASCII( 41 SetCommandLineSwitchASCII(
41 switches::kPrerenderFromOmnibox, 42 switches::kPrerenderFromOmnibox,
42 switches::kPrerenderFromOmniboxSwitchValueEnabled); 43 switches::kPrerenderFromOmniboxSwitchValueEnabled);
44 #if defined(GOOGLE_TV)
45 SetCommandLineSwitch(switches::kEnableEncryptedMedia);
46 #endif
43 } 47 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698