summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 01:25:29 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 01:25:29 +0000
commit3184cba4196ffe82c2352e46136372420bdaf36c (patch)
tree36a7edb8a34768d06661fb10164497833bfea4dd
parentd8fd513cd610568904212fa0d2a0de523d85a2ff (diff)
downloadchromium_src-3184cba4196ffe82c2352e46136372420bdaf36c.zip
chromium_src-3184cba4196ffe82c2352e46136372420bdaf36c.tar.gz
chromium_src-3184cba4196ffe82c2352e46136372420bdaf36c.tar.bz2
Create app_switches and remove a dep.
Move resource.h to app. http://crbug.com/11387 Review URL: http://codereview.chromium.org/113435 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16139 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/DEPS5
-rw-r--r--app/app.vcproj44
-rw-r--r--app/app_switches.cc13
-rw-r--r--app/app_switches.h16
-rw-r--r--app/l10n_util.cc2
-rw-r--r--app/l10n_util_unittest.cc6
-rw-r--r--app/test/data/resource.h (renamed from chrome/test/data/resource.h)0
-rw-r--r--chrome/browser/first_run.cc1
-rw-r--r--chrome/browser/plugin_process_host.cc1
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc1
-rw-r--r--chrome/chrome.gyp2
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/common_glue.cc1
-rw-r--r--chrome/common/pref_service_unittest.cc2
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc1
-rw-r--r--chrome/test/data/resource.rc2
17 files changed, 68 insertions, 34 deletions
diff --git a/app/DEPS b/app/DEPS
index 5ad4cd1..a087ecf 100644
--- a/app/DEPS
+++ b/app/DEPS
@@ -6,11 +6,6 @@ include_rules = [
# TODO(beng): Sever these links once we have extracted all deps from
# chrome/common.
"+chrome/common/chrome_paths.h",
- "+chrome/common/chrome_switches.h",
- "+chrome/common/gtk_util.h",
-
- # TODO(beng): l10n_util_unittest.cc:
- "+chrome/test/data/resource.h",
"+skia",
]
diff --git a/app/app.vcproj b/app/app.vcproj
index cc618af..37a051d 100644
--- a/app/app.vcproj
+++ b/app/app.vcproj
@@ -145,14 +145,14 @@
>
</File>
<File
- RelativePath=".\gfx\color_utils.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\color_utils.h"
- >
- </File>
- <File
+ RelativePath=".\gfx\color_utils.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\color_utils.h"
+ >
+ </File>
+ <File
RelativePath=".\gfx\favicon_size.h"
>
</File>
@@ -176,14 +176,14 @@
RelativePath=".\gfx\path_win.cc"
>
</File>
- <File
- RelativePath=".\gfx\text_elider.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\text_elider.h"
- >
- </File>
+ <File
+ RelativePath=".\gfx\text_elider.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\text_elider.h"
+ >
+ </File>
</Filter>
<File
RelativePath=".\animation.cc"
@@ -194,6 +194,14 @@
>
</File>
<File
+ RelativePath=".\app_switches.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\app_switches.h"
+ >
+ </File>
+ <File
RelativePath=".\drag_drop_types.cc"
>
</File>
@@ -222,11 +230,11 @@
>
</File>
<File
- RelativePath=".\os_exchange_data_win.cc"
+ RelativePath=".\os_exchange_data.h"
>
</File>
<File
- RelativePath=".\os_exchange_data.h"
+ RelativePath=".\os_exchange_data_win.cc"
>
</File>
<File
diff --git a/app/app_switches.cc b/app/app_switches.cc
new file mode 100644
index 0000000..f07fa32e6
--- /dev/null
+++ b/app/app_switches.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2009 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 "app/app_switches.h"
+
+namespace switches {
+
+// The language file that we want to try to open. Of the form
+// language[-country] where language is the 2 letter code from ISO-639.
+const wchar_t kLang[] = L"lang";
+
+} // namespace switches
diff --git a/app/app_switches.h b/app/app_switches.h
new file mode 100644
index 0000000..72038b9
--- /dev/null
+++ b/app/app_switches.h
@@ -0,0 +1,16 @@
+// Copyright (c) 2009 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.
+
+// Defines all the command-line switches used by app.
+
+#ifndef APP_APP_SWITCHES_H_
+#define APP_APP_SWITCHES_H_
+
+namespace switches {
+
+extern const wchar_t kLang[];
+
+} // namespace switches
+
+#endif // #ifndef APP_APP_SWITCHES_H_
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 285b8ab..adbef03 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
+#include "app/app_switches.h"
#include "app/gfx/chrome_canvas.h"
#include "app/resource_bundle.h"
#include "base/command_line.h"
@@ -17,7 +18,6 @@
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/chrome_switches.h"
#include "unicode/uscript.h"
// TODO(playmobil): remove this undef once SkPostConfig.h is fixed.
diff --git a/app/l10n_util_unittest.cc b/app/l10n_util_unittest.cc
index 0ca5608..b1f8c93 100644
--- a/app/l10n_util_unittest.cc
+++ b/app/l10n_util_unittest.cc
@@ -5,6 +5,9 @@
#include "build/build_config.h"
#include "app/l10n_util.h"
+#if !defined(OS_MACOSX)
+#include "app/test/data/resource.h"
+#endif
#include "base/basictypes.h"
#include "base/file_util.h"
#include "base/path_service.h"
@@ -14,9 +17,6 @@
#include "base/win_util.h"
#endif
#include "chrome/common/chrome_paths.h"
-#if !defined(OS_MACOSX)
-#include "chrome/test/data/resource.h"
-#endif
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "unicode/locid.h"
diff --git a/chrome/test/data/resource.h b/app/test/data/resource.h
index 7008da4..7008da4 100644
--- a/chrome/test/data/resource.h
+++ b/app/test/data/resource.h
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc
index d00ee47..7dbb3df 100644
--- a/chrome/browser/first_run.cc
+++ b/chrome/browser/first_run.cc
@@ -11,6 +11,7 @@
#include <sstream>
+#include "app/app_switches.h"
#include "app/resource_bundle.h"
#include "base/command_line.h"
#include "base/file_util.h"
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 36d01c6..fc2f383 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -12,6 +12,7 @@
#include <vector>
+#include "app/app_switches.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index b5f9b4b..6ae9d1b 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -11,6 +11,7 @@
#include <algorithm>
+#include "app/app_switches.h"
#if defined(OS_WIN)
#include "app/win_util.h"
#endif
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index db5ff38..0ca6e3a 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -174,6 +174,8 @@
# All .cc, .h, and .mm files under app/ except for tests.
'../app/animation.cc',
'../app/animation.h',
+ '../app/app_switches.h',
+ '../app/app_switches.cc',
'../app/drag_drop_types.cc',
'../app/drag_drop_types.h',
'../app/gfx/chrome_canvas.cc',
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 680e479..018a6a6 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -145,10 +145,6 @@ const wchar_t kJavaScriptFlags[] = L"js-flags";
// string value, the 2 letter code from ISO 3166-1.
const wchar_t kCountry[] = L"country";
-// The language file that we want to try to open. Of the form
-// language[-country] where language is the 2 letter code from ISO-639.
-const wchar_t kLang[] = L"lang";
-
// Will add kDebugOnStart to every child processes. If a value is passed, it
// will be used as a filter to determine if the child process should have the
// kDebugOnStart flag passed on or not.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index eca5247..f987cb2 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -48,7 +48,6 @@ extern const wchar_t kPluginPath[];
extern const wchar_t kUserAgent[];
extern const wchar_t kJavaScriptFlags[];
extern const wchar_t kCountry[];
-extern const wchar_t kLang[];
extern const wchar_t kDebugChildren[];
extern const wchar_t kWaitForDebuggerChildren[];
diff --git a/chrome/common/common_glue.cc b/chrome/common/common_glue.cc
index 00e9817..7ca0bf8 100644
--- a/chrome/common/common_glue.cc
+++ b/chrome/common/common_glue.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "app/app_switches.h"
#include "app/l10n_util.h"
#include "base/command_line.h"
#include "base/path_service.h"
diff --git a/chrome/common/pref_service_unittest.cc b/chrome/common/pref_service_unittest.cc
index a7e75e0..1c017a2 100644
--- a/chrome/common/pref_service_unittest.cc
+++ b/chrome/common/pref_service_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "app/test/data/resource.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"
@@ -10,7 +11,6 @@
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
-#include "chrome/test/data/resource.h"
#include "testing/gtest/include/gtest/gtest.h"
class PrefServiceTest : public testing::Test {
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index 7d62a76..a18ca85 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -4,6 +4,7 @@
#include <string>
+#include "app/app_switches.h"
#include "app/message_box_flags.h"
#include "base/command_line.h"
#include "base/file_path.h"
diff --git a/chrome/test/data/resource.rc b/chrome/test/data/resource.rc
index 767b9db..bdf6492 100644
--- a/chrome/test/data/resource.rc
+++ b/chrome/test/data/resource.rc
@@ -1,6 +1,6 @@
// Microsoft Visual C++ generated resource script.
//
-#include "resource.h"
+#include "app/test/data/resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////