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

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

Issue 10808052: Tidy up Android's is-tablet functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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 | Annotate | Revision Log
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"
(...skipping 10 matching lines...) Expand all
21 command_line->AppendSwitch(switch_string); 21 command_line->AppendSwitch(switch_string);
22 } 22 }
23 23
24 void SetCommandLineSwitchASCII(const std::string& switch_string, 24 void SetCommandLineSwitchASCII(const std::string& switch_string,
25 const std::string& value) { 25 const std::string& value) {
26 CommandLine* command_line = CommandLine::ForCurrentProcess(); 26 CommandLine* command_line = CommandLine::ForCurrentProcess();
27 if (!command_line->HasSwitch(switch_string)) 27 if (!command_line->HasSwitch(switch_string))
28 command_line->AppendSwitchASCII(switch_string, value); 28 command_line->AppendSwitchASCII(switch_string, value);
29 } 29 }
30 30
31 bool IsTabletUi() {
32 NOTIMPLEMENTED() << "TODO(yfriedman): Upstream this";
33 return false;
34 }
35
36 } // namespace 31 } // namespace
37 32
38 void SetChromeSpecificCommandLineFlags() { 33 void SetChromeSpecificCommandLineFlags() {
39 // Always enable SPDY. 34 // Always enable SPDY.
40 SetCommandLineSwitch(switches::kEnableNpn); 35 SetCommandLineSwitch(switches::kEnableNpn);
41 36
42 // Turn on autofill. 37 // Turn on autofill.
43 SetCommandLineSwitch(switches::kExternalAutofillPopup); 38 SetCommandLineSwitch(switches::kExternalAutofillPopup);
44 39
45 // Turn on autologin. 40 // Turn on autologin.
46 SetCommandLineSwitch(switches::kEnableAutologin); 41 SetCommandLineSwitch(switches::kEnableAutologin);
47 42
48 // Tablet UI switch (used for using correct version of NTP HTML).
49 if (IsTabletUi())
50 SetCommandLineSwitch(switches::kTabletUi);
51
52 // Enable prerender for the omnibox. 43 // Enable prerender for the omnibox.
53 SetCommandLineSwitchASCII( 44 SetCommandLineSwitchASCII(
54 switches::kPrerenderMode, switches::kPrerenderModeSwitchValueEnabled); 45 switches::kPrerenderMode, switches::kPrerenderModeSwitchValueEnabled);
55 SetCommandLineSwitchASCII( 46 SetCommandLineSwitchASCII(
56 switches::kPrerenderFromOmnibox, 47 switches::kPrerenderFromOmnibox,
57 switches::kPrerenderFromOmniboxSwitchValueEnabled); 48 switches::kPrerenderFromOmniboxSwitchValueEnabled);
58 } 49 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/session_model_associator.cc » ('j') | chrome/common/chrome_content_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698