Rename GetIconID to GetIconId
[chromium-blink-merge.git] / chrome / browser / android / chrome_startup_flags.cc
blob3a53f35f33898868a509b2be5d7d8aa4e7849ffe
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
3 // found in the LICENSE file.
5 #include <jni.h>
7 #include "chrome/browser/android/chrome_startup_flags.h"
9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h"
11 #include "base/android/scoped_java_ref.h"
12 #include "base/command_line.h"
13 #include "base/logging.h"
14 #include "base/sys_info.h"
15 #include "chrome/common/channel_info.h"
16 #include "chrome/common/chrome_switches.h"
17 #include "components/dom_distiller/core/dom_distiller_switches.h"
18 #include "media/base/media_switches.h"
20 namespace {
22 void SetCommandLineSwitch(const std::string& switch_string) {
23 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
24 if (!command_line->HasSwitch(switch_string))
25 command_line->AppendSwitch(switch_string);
28 void SetCommandLineSwitchASCII(const std::string& switch_string,
29 const std::string& value) {
30 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
31 if (!command_line->HasSwitch(switch_string))
32 command_line->AppendSwitchASCII(switch_string, value);
35 } // namespace
37 void SetChromeSpecificCommandLineFlags() {
38 // Enable prerender for the omnibox.
39 SetCommandLineSwitchASCII(switches::kPrerenderFromOmnibox,
40 switches::kPrerenderFromOmniboxSwitchValueEnabled);
42 // Disable syncing favicons on low end devices.
43 if (base::SysInfo::IsLowEndDevice())
44 SetCommandLineSwitchASCII(switches::kDisableSyncTypes, "Favicon Images");
46 // Enable DOM Distiller backend.
47 SetCommandLineSwitch(switches::kEnableDomDistiller);