summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 04:12:43 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 04:12:43 +0000
commit7d1d20951e7de62096b76818d4c6de3c86786851 (patch)
treeedd5e2dabd36d080f938240240a11fad14fba306
parente430a7ceeb0d3b368ab3ec2b2b90b4750ec18f46 (diff)
downloadchromium_src-7d1d20951e7de62096b76818d4c6de3c86786851.zip
chromium_src-7d1d20951e7de62096b76818d4c6de3c86786851.tar.gz
chromium_src-7d1d20951e7de62096b76818d4c6de3c86786851.tar.bz2
apps: Stop depending on chrome_switches.h
Instead move kShowAppListShortcut to a new apps_switches.h BUG=159366 R=benwells@chromium.org Review URL: https://chromiumcodereview.appspot.com/12391047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185833 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/DEPS1
-rw-r--r--apps/app_launcher.cc2
-rw-r--r--apps/apps.gypi2
-rw-r--r--apps/switches.cc14
-rw-r--r--apps/switches.h16
-rw-r--r--chrome/browser/about_flags.cc3
-rw-r--r--chrome/browser/extensions/api/webstore_private/webstore_private_api.cc4
-rw-r--r--chrome/browser/ui/views/app_list/app_list_controller_win.cc3
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
10 files changed, 39 insertions, 10 deletions
diff --git a/apps/DEPS b/apps/DEPS
index 90a33a6..5de510e 100644
--- a/apps/DEPS
+++ b/apps/DEPS
@@ -8,7 +8,6 @@ include_rules = [
"+chrome/browser/profiles",
"+chrome/browser/ui/host_desktop.h",
"+chrome/common/chrome_notification_types.h",
- "+chrome/common/chrome_switches.h",
"+chrome/common/extensions",
"+chrome/installer",
]
diff --git a/apps/app_launcher.cc b/apps/app_launcher.cc
index 7ad4578..b5c5fe9 100644
--- a/apps/app_launcher.cc
+++ b/apps/app_launcher.cc
@@ -5,13 +5,13 @@
#include "apps/app_launcher.h"
#include "apps/pref_names.h"
+#include "apps/switches.h"
#include "base/command_line.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/ui/host_desktop.h"
-#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
#if defined(OS_WIN)
diff --git a/apps/apps.gypi b/apps/apps.gypi
index 4bee420..7cd349b 100644
--- a/apps/apps.gypi
+++ b/apps/apps.gypi
@@ -32,6 +32,8 @@
'pref_names.h',
'prefs.cc',
'prefs.h',
+ 'switches.cc',
+ 'switches.h',
],
'conditions': [
['enable_extensions==0', {
diff --git a/apps/switches.cc b/apps/switches.cc
new file mode 100644
index 0000000..f5051c9
--- /dev/null
+++ b/apps/switches.cc
@@ -0,0 +1,14 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "apps/switches.h"
+
+namespace apps {
+namespace switches {
+
+// If true an app list shortcut will be shown in the taskbar.
+const char kShowAppListShortcut[] = "show-app-list-shortcut";
+
+} // namespace switches
+} // namespace apps
diff --git a/apps/switches.h b/apps/switches.h
new file mode 100644
index 0000000..c9ff965
--- /dev/null
+++ b/apps/switches.h
@@ -0,0 +1,16 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef APPS_SWITCHES_H_
+#define APPS_SWITCHES_H_
+
+namespace apps {
+namespace switches {
+
+extern const char kShowAppListShortcut[];
+
+} // namespace switches
+} // namespace apps
+
+#endif // APPS_SWITCHES_H_
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index d83a3fd..32af2c6 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -10,6 +10,7 @@
#include <set>
#include <utility>
+#include "apps/switches.h"
#include "base/command_line.h"
#include "base/memory/singleton.h"
#include "base/prefs/pref_service.h"
@@ -1179,7 +1180,7 @@ const Experiment kExperiments[] = {
IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_NAME,
IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_DESCRIPTION,
kOsWin,
- SINGLE_VALUE_TYPE(switches::kShowAppListShortcut)
+ SINGLE_VALUE_TYPE(apps::switches::kShowAppListShortcut)
},
{
"enable-experimental-form-filling",
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
index 0a9d05b..10e680f 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
#include "apps/app_launcher.h"
+#include "apps/switches.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
@@ -31,7 +32,6 @@
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/app_list/app_list_service.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_l10n_util.h"
@@ -455,7 +455,7 @@ bool CompleteInstallFunction::RunImpl() {
} else {
LOG(INFO) << "Enabling App Launcher via flags";
about_flags::SetExperimentEnabled(g_browser_process->local_state(),
- switches::kShowAppListShortcut,
+ apps::switches::kShowAppListShortcut,
true);
}
}
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index b2c6231..699e5e9 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -4,6 +4,7 @@
#include <sstream>
+#include "apps/switches.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/lazy_instance.h"
@@ -710,7 +711,7 @@ void CheckAppListTaskbarShortcutOnFileThread(
.AddExtension(installer::kLnkExt));
const bool should_show =
CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kShowAppListShortcut);
+ apps::switches::kShowAppListShortcut);
// This will not reshow a shortcut if it has been unpinned manually by the
// user, as that will not delete the shortcut file.
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 19fe39a..b85012e 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1209,9 +1209,6 @@ const char kSetToken[] = "set-token";
// If true the app list will be shown.
const char kShowAppList[] = "show-app-list";
-// If true an app list shortcut will be shown in the taskbar.
-const char kShowAppListShortcut[] = "show-app-list-shortcut";
-
// Annotates forms with Autofill field type predictions.
const char kShowAutofillTypePredictions[] = "show-autofill-type-predictions";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index bd7ea64..75989fe 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -322,7 +322,6 @@ extern const char kSideloadWipeout[];
extern const char kSilentLaunch[];
extern const char kSetToken[];
extern const char kShowAppList[];
-extern const char kShowAppListShortcut[];
extern const char kShowAutofillTypePredictions[];
extern const char kShowComponentExtensionOptions[];
extern const char kShowIcons[];