| 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 <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 Loading... |
| 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 } |
| OLD | NEW |