summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-15 00:36:27 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-15 00:36:27 +0000
commit6bf9061f137de33b450f5ae9634b8c903bf2326d (patch)
treebf211f9108fdaafb0c065bb34d01fae62fc2e4bd /chrome/browser
parent5c10302fc35eff459864d872d33f0091a521c98b (diff)
downloadchromium_src-6bf9061f137de33b450f5ae9634b8c903bf2326d.zip
chromium_src-6bf9061f137de33b450f5ae9634b8c903bf2326d.tar.gz
chromium_src-6bf9061f137de33b450f5ae9634b8c903bf2326d.tar.bz2
Rename extension_manifest_keys namespace to extensions::manifest_keys.
Move it to extensions/common/manifest_constants.cc. Minorly improve packaged app + manifest version 1 error message. BUG=162530 TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/22794012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/background/background_application_list_model_unittest.cc8
-rw-r--r--chrome/browser/chromeos/app_mode/kiosk_app_data.cc4
-rw-r--r--chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc18
-rw-r--r--chrome/browser/extensions/admin_policy_unittest.cc10
-rw-r--r--chrome/browser/extensions/api/messaging/message_service.cc10
-rw-r--r--chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc3
-rw-r--r--chrome/browser/extensions/api/spellcheck/spellcheck_api.cc3
-rw-r--r--chrome/browser/extensions/api/storage/managed_value_store_cache.cc7
-rw-r--r--chrome/browser/extensions/component_loader.cc6
-rw-r--r--chrome/browser/extensions/convert_user_script.cc2
-rw-r--r--chrome/browser/extensions/convert_web_app.cc5
-rw-r--r--chrome/browser/extensions/extension_info_map_unittest.cc4
-rw-r--r--chrome/browser/extensions/extension_install_prompt.cc6
-rw-r--r--chrome/browser/extensions/extension_prefs_unittest.cc54
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_sorting_unittest.cc4
-rw-r--r--chrome/browser/extensions/extension_special_storage_policy_unittest.cc4
-rw-r--r--chrome/browser/extensions/installed_loader.cc9
-rw-r--r--chrome/browser/extensions/sandboxed_unpacker.cc5
-rw-r--r--chrome/browser/extensions/standard_management_policy_provider_unittest.cc6
-rw-r--r--chrome/browser/extensions/test_extension_prefs.cc17
-rw-r--r--chrome/browser/extensions/updater/extension_updater_unittest.cc8
-rw-r--r--chrome/browser/extensions/webstore_installer.cc5
-rw-r--r--chrome/browser/media_galleries/media_galleries_test_util.cc12
-rw-r--r--chrome/browser/profile_resetter/profile_resetter_unittest.cc14
-rw-r--r--chrome/browser/search_engines/template_url_service_unittest.cc8
-rw-r--r--chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc4
-rw-r--r--chrome/browser/sync/test/integration/sync_extension_helper.cc20
-rw-r--r--chrome/browser/themes/theme_service_unittest.cc1
-rw-r--r--chrome/browser/themes/theme_syncable_service_unittest.cc10
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_unittest.cc18
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm4
-rw-r--r--chrome/browser/ui/panels/base_panel_browser_test.cc6
-rw-r--r--chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc6
-rw-r--r--chrome/browser/ui/webui/policy_ui.cc6
35 files changed, 146 insertions, 163 deletions
diff --git a/chrome/browser/background/background_application_list_model_unittest.cc b/chrome/browser/background/background_application_list_model_unittest.cc
index 0858e73..2e410c0 100644
--- a/chrome/browser/background/background_application_list_model_unittest.cc
+++ b/chrome/browser/background/background_application_list_model_unittest.cc
@@ -19,12 +19,12 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/permissions_updater.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/permissions/api_permission.h"
#include "chrome/common/extensions/permissions/permission_set.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
// This value is used to seed the PRNG at the beginning of a sequence of
@@ -62,11 +62,11 @@ class BackgroundApplicationListModelTest : public ExtensionServiceTestBase {
static scoped_refptr<Extension> CreateExtension(const std::string& name,
bool background_permission) {
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kVersion, "1.0.0.0");
- manifest.SetString(extension_manifest_keys::kName, name);
+ manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
+ manifest.SetString(extensions::manifest_keys::kName, name);
if (background_permission) {
ListValue* permissions = new ListValue();
- manifest.Set(extension_manifest_keys::kPermissions, permissions);
+ manifest.Set(extensions::manifest_keys::kPermissions, permissions);
permissions->Append(Value::CreateStringValue("background"));
}
std::string error;
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
index 524c98b..9c00e9e 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_data.cc
@@ -20,9 +20,9 @@
#include "chrome/browser/image_decoder.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "ui/gfx/codec/png_codec.h"
using content::BrowserThread;
@@ -63,7 +63,7 @@ void SaveIconToLocalOnBlockingPool(
// Returns true for valid kiosk app manifest.
bool IsValidKioskAppManifest(const extensions::Manifest& manifest) {
bool kiosk_enabled;
- if (manifest.GetBoolean(extension_manifest_keys::kKioskEnabled,
+ if (manifest.GetBoolean(extensions::manifest_keys::kKioskEnabled,
&kiosk_enabled)) {
return kiosk_enabled;
}
diff --git a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
index 376b90a..2a61f89 100644
--- a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
@@ -14,8 +14,8 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_l10n_util.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "ui/base/l10n/l10n_util.h"
namespace chromeos {
@@ -177,18 +177,18 @@ bool ComponentExtensionIMEManagerImpl::ReadEngineComponent(
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
DCHECK(out);
std::string type;
- if (!dict.GetString(extension_manifest_keys::kType, &type))
+ if (!dict.GetString(extensions::manifest_keys::kType, &type))
return false;
if (type != "ime")
return false;
- if (!dict.GetString(extension_manifest_keys::kId, &out->engine_id))
+ if (!dict.GetString(extensions::manifest_keys::kId, &out->engine_id))
return false;
- if (!dict.GetString(extension_manifest_keys::kName, &out->display_name))
+ if (!dict.GetString(extensions::manifest_keys::kName, &out->display_name))
return false;
std::set<std::string> languages;
const base::Value* language_value = NULL;
- if (dict.Get(extension_manifest_keys::kLanguage, &language_value)) {
+ if (dict.Get(extensions::manifest_keys::kLanguage, &language_value)) {
if (language_value->GetType() == base::Value::TYPE_STRING) {
std::string language_str;
language_value->GetAsString(&language_str);
@@ -207,7 +207,7 @@ bool ComponentExtensionIMEManagerImpl::ReadEngineComponent(
out->language_codes.assign(languages.begin(), languages.end());
const ListValue* layouts = NULL;
- if (!dict.GetList(extension_manifest_keys::kLayouts, &layouts))
+ if (!dict.GetList(extensions::manifest_keys::kLayouts, &layouts))
return false;
for (size_t i = 0; i < layouts->GetSize(); ++i) {
@@ -224,11 +224,11 @@ bool ComponentExtensionIMEManagerImpl::ReadExtensionInfo(
const std::string& extension_id,
ComponentExtensionIME* out) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- if (!manifest.GetString(extension_manifest_keys::kDescription,
+ if (!manifest.GetString(extensions::manifest_keys::kDescription,
&out->description))
return false;
std::string url_string;
- if (!manifest.GetString(extension_manifest_keys::kOptionsPage, &url_string))
+ if (!manifest.GetString(extensions::manifest_keys::kOptionsPage, &url_string))
return true; // It's okay to return true on no option page case.
GURL url = extensions::Extension::GetResourceURL(
@@ -271,7 +271,7 @@ void ComponentExtensionIMEManagerImpl::ReadComponentExtensionsInfo(
component_ime.id = whitelisted_component_extension[i].id;
const ListValue* component_list;
- if (!manifest->GetList(extension_manifest_keys::kInputComponents,
+ if (!manifest->GetList(extensions::manifest_keys::kInputComponents,
&component_list))
continue;
diff --git a/chrome/browser/extensions/admin_policy_unittest.cc b/chrome/browser/extensions/admin_policy_unittest.cc
index 4c41f02..b5d3b84 100644
--- a/chrome/browser/extensions/admin_policy_unittest.cc
+++ b/chrome/browser/extensions/admin_policy_unittest.cc
@@ -6,8 +6,8 @@
#include "base/values.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Value;
@@ -25,16 +25,16 @@ class ExtensionAdminPolicyTest : public testing::Test {
void CreateHostedApp(Manifest::Location location) {
base::DictionaryValue values;
- values.Set(extension_manifest_keys::kWebURLs, new base::ListValue());
- values.SetString(extension_manifest_keys::kLaunchWebURL,
+ values.Set(extensions::manifest_keys::kWebURLs, new base::ListValue());
+ values.SetString(extensions::manifest_keys::kLaunchWebURL,
"http://www.example.com");
CreateExtensionFromValues(location, &values);
}
void CreateExtensionFromValues(Manifest::Location location,
base::DictionaryValue* values) {
- values->SetString(extension_manifest_keys::kName, "test");
- values->SetString(extension_manifest_keys::kVersion, "0.1");
+ values->SetString(extensions::manifest_keys::kName, "test");
+ values->SetString(extensions::manifest_keys::kVersion, "0.1");
std::string error;
extension_ = Extension::Create(base::FilePath(), location, *values,
Extension::NO_FLAGS, &error);
diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc
index 00e40f7..be6d2fee 100644
--- a/chrome/browser/extensions/api/messaging/message_service.cc
+++ b/chrome/browser/extensions/api/messaging/message_service.cc
@@ -26,7 +26,6 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/common/extensions/background_info.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/incognito_handler.h"
#include "chrome/common/extensions/manifest_handlers/externally_connectable.h"
@@ -38,6 +37,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/common/manifest_constants.h"
#include "url/gurl.h"
using content::SiteInstance;
@@ -113,7 +113,7 @@ static base::StaticAtomicSequenceNumber g_channel_id_overflow_count;
static content::RenderProcessHost* GetExtensionProcess(
Profile* profile, const std::string& extension_id) {
SiteInstance* site_instance =
- extensions::ExtensionSystem::Get(profile)->process_manager()->
+ ExtensionSystem::Get(profile)->process_manager()->
GetSiteInstanceForURL(
Extension::GetBaseURLFromExtensionId(extension_id));
@@ -206,7 +206,7 @@ void MessageService::OpenChannelToExtension(
}
ExtensionService* extension_service =
- extensions::ExtensionSystem::Get(profile)->extension_service();
+ ExtensionSystem::Get(profile)->extension_service();
if (profile->IsOffTheRecord() &&
!extension_service->IsIncognitoEnabled(target_extension_id)) {
@@ -222,7 +222,7 @@ void MessageService::OpenChannelToExtension(
ExternallyConnectableInfo* externally_connectable =
static_cast<ExternallyConnectableInfo*>(
target_extension->GetManifestData(
- extension_manifest_keys::kExternallyConnectable));
+ manifest_keys::kExternallyConnectable));
bool is_externally_connectable = false;
if (externally_connectable) {
@@ -305,7 +305,7 @@ void MessageService::OpenChannelToNativeApp(
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
Profile* profile = Profile::FromBrowserContext(source->GetBrowserContext());
ExtensionService* extension_service =
- extensions::ExtensionSystem::Get(profile)->extension_service();
+ ExtensionSystem::Get(profile)->extension_service();
bool has_permission = false;
if (extension_service) {
const Extension* extension =
diff --git a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc
index e187224..00272c8 100644
--- a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc
+++ b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc
@@ -12,15 +12,12 @@
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_prefs_unittest.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/test/base/testing_profile.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Value;
-namespace keys = extension_manifest_keys;
-
namespace extensions {
namespace {
diff --git a/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc b/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc
index 8c43e53..2c779dc 100644
--- a/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc
+++ b/chrome/browser/extensions/api/spellcheck/spellcheck_api.cc
@@ -15,7 +15,6 @@
namespace extensions {
-namespace keys = extension_manifest_keys;
namespace errors = extension_manifest_errors;
namespace {
@@ -24,7 +23,7 @@ SpellcheckDictionaryInfo* GetSpellcheckDictionaryInfo(
const Extension* extension) {
SpellcheckDictionaryInfo *spellcheck_info =
static_cast<SpellcheckDictionaryInfo*>(
- extension->GetManifestData(keys::kSpellcheck));
+ extension->GetManifestData(manifest_keys::kSpellcheck));
return spellcheck_info;
}
diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
index 3b3b15b..4d2453a 100644
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
@@ -25,7 +25,6 @@
#include "chrome/browser/value_store/value_store_change.h"
#include "chrome/common/extensions/api/storage/storage_schema_manifest_handler.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/permissions/api_permission.h"
@@ -34,6 +33,7 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
+#include "extensions/common/manifest_constants.h"
using content::BrowserThread;
@@ -104,8 +104,7 @@ void ManagedValueStoreCache::ExtensionTracker::Observe(
ExtensionSystem::Get(profile_)->extension_service()->extensions();
scoped_ptr<ExtensionSet> managed_extensions(new ExtensionSet());
for (ExtensionSet::const_iterator it = set->begin(); it != set->end(); ++it) {
- if ((*it)->manifest()->HasPath(
- extension_manifest_keys::kStorageManagedSchema)) {
+ if ((*it)->manifest()->HasPath(manifest_keys::kStorageManagedSchema)) {
managed_extensions->Insert(*it);
}
@@ -135,7 +134,7 @@ void ManagedValueStoreCache::ExtensionTracker::LoadSchemas(
it != extensions->end(); ++it) {
std::string schema_file;
if (!(*it)->manifest()->GetString(
- extension_manifest_keys::kStorageManagedSchema, &schema_file)) {
+ manifest_keys::kStorageManagedSchema, &schema_file)) {
// TODO(joaodasilva): Remove this for M30. http://crbug.com/240704
if ((*it)->HasAPIPermission(APIPermission::kStorage)) {
descriptor->RegisterComponent((*it)->id(),
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index 769c098..3253450 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -20,11 +20,11 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_file_util.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "extensions/common/id_util.h"
+#include "extensions/common/manifest_constants.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -90,7 +90,7 @@ std::string GenerateId(const DictionaryValue* manifest,
const base::FilePath& path) {
std::string raw_key;
std::string id_input;
- CHECK(manifest->GetString(extension_manifest_keys::kPublicKey, &raw_key));
+ CHECK(manifest->GetString(manifest_keys::kPublicKey, &raw_key));
CHECK(Extension::ParsePEMKeyBytes(raw_key, &id_input));
std::string id = id_util::GenerateId(id_input);
return id;
@@ -302,7 +302,7 @@ void ComponentLoader::AddWithName(int manifest_resource_id,
if (manifest) {
// Update manifest to use a proper name.
- manifest->SetString(extension_manifest_keys::kName, name);
+ manifest->SetString(manifest_keys::kName, name);
Add(manifest, root_directory);
}
}
diff --git a/chrome/browser/extensions/convert_user_script.cc b/chrome/browser/extensions/convert_user_script.cc
index 16ab729..4d8b064 100644
--- a/chrome/browser/extensions/convert_user_script.cc
+++ b/chrome/browser/extensions/convert_user_script.cc
@@ -25,7 +25,7 @@
#include "extensions/common/user_script.h"
#include "url/gurl.h"
-namespace keys = extension_manifest_keys;
+namespace keys = extensions::manifest_keys;
namespace values = extension_manifest_values;
namespace extensions {
diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc
index dc3d946..39c905b 100644
--- a/chrome/browser/extensions/convert_web_app.cc
+++ b/chrome/browser/extensions/convert_web_app.cc
@@ -22,17 +22,17 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_file_util.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/web_application_info.h"
#include "crypto/sha2.h"
#include "extensions/common/constants.h"
+#include "extensions/common/manifest_constants.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/png_codec.h"
#include "url/gurl.h"
namespace extensions {
-namespace keys = extension_manifest_keys;
+namespace keys = manifest_keys;
using base::Time;
@@ -59,7 +59,6 @@ std::string GenerateKey(const GURL& manifest_url) {
} // namespace
-
// Generates a version for the converted app using the current date. This isn't
// really needed, but it seems like useful information.
std::string ConvertTimeToExtensionVersion(const Time& create_time) {
diff --git a/chrome/browser/extensions/extension_info_map_unittest.cc b/chrome/browser/extensions/extension_info_map_unittest.cc
index 10dace7..9439cf3 100644
--- a/chrome/browser/extensions/extension_info_map_unittest.cc
+++ b/chrome/browser/extensions/extension_info_map_unittest.cc
@@ -8,8 +8,8 @@
#include "chrome/browser/extensions/extension_info_map.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
@@ -17,7 +17,7 @@ using extensions::APIPermission;
using extensions::Extension;
using extensions::Manifest;
-namespace keys = extension_manifest_keys;
+namespace keys = extensions::manifest_keys;
namespace {
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 37154bf..4f1363a 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -26,7 +26,6 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/feature_switch.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/manifest_handlers/icons_handler.h"
@@ -36,6 +35,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "extensions/common/extension_resource.h"
+#include "extensions/common/manifest_constants.h"
#include "extensions/common/url_pattern.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -457,11 +457,11 @@ scoped_refptr<Extension>
if (!localized_name.empty() || !localized_description.empty()) {
localized_manifest.reset(manifest->DeepCopy());
if (!localized_name.empty()) {
- localized_manifest->SetString(extension_manifest_keys::kName,
+ localized_manifest->SetString(extensions::manifest_keys::kName,
localized_name);
}
if (!localized_description.empty()) {
- localized_manifest->SetString(extension_manifest_keys::kDescription,
+ localized_manifest->SetString(extensions::manifest_keys::kDescription,
localized_description);
}
}
diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc
index eabf8ab..5d5f9c7 100644
--- a/chrome/browser/extensions/extension_prefs_unittest.cc
+++ b/chrome/browser/extensions/extension_prefs_unittest.cc
@@ -18,13 +18,13 @@
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/permissions/permission_set.h"
#include "chrome/common/extensions/permissions/permissions_info.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/test/mock_notification_observer.h"
+#include "extensions/common/manifest_constants.h"
#include "sync/api/string_ordinal.h"
using base::Time;
@@ -441,9 +441,8 @@ class ExtensionPrefsDelayedInstallInfo : public ExtensionPrefsTest {
// Sets idle install information for one test extension.
void SetIdleInfo(std::string id, int num) {
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kName, "test");
- manifest.SetString(extension_manifest_keys::kVersion,
- "1." + base::IntToString(num));
+ manifest.SetString(manifest_keys::kName, "test");
+ manifest.SetString(manifest_keys::kVersion, "1." + base::IntToString(num));
base::FilePath path =
prefs_.extensions_dir().AppendASCII(base::IntToString(num));
std::string errors;
@@ -470,7 +469,7 @@ class ExtensionPrefsDelayedInstallInfo : public ExtensionPrefsTest {
info->extension_path.BaseName().MaybeAsASCII());
}
- bool HasInfoForId(extensions::ExtensionPrefs::ExtensionsInfo* info,
+ bool HasInfoForId(ExtensionPrefs::ExtensionsInfo* info,
const std::string& id) {
for (size_t i = 0; i < info->size(); ++i) {
if (info->at(i)->extension_id == id)
@@ -492,7 +491,7 @@ class ExtensionPrefsDelayedInstallInfo : public ExtensionPrefsTest {
SetIdleInfo(id2_, 2);
VerifyIdleInfo(id1_, 1);
VerifyIdleInfo(id2_, 2);
- scoped_ptr<extensions::ExtensionPrefs::ExtensionsInfo> info(
+ scoped_ptr<ExtensionPrefs::ExtensionsInfo> info(
prefs()->GetAllDelayedInstallInfo());
EXPECT_EQ(2u, info->size());
EXPECT_TRUE(HasInfoForId(info.get(), id1_));
@@ -524,7 +523,7 @@ class ExtensionPrefsDelayedInstallInfo : public ExtensionPrefsTest {
virtual void Verify() OVERRIDE {
// Make sure the info for the 3 extensions we expect is present.
- scoped_ptr<extensions::ExtensionPrefs::ExtensionsInfo> info(
+ scoped_ptr<ExtensionPrefs::ExtensionsInfo> info(
prefs()->GetAllDelayedInstallInfo());
EXPECT_EQ(3u, info->size());
EXPECT_TRUE(HasInfoForId(info.get(), id1_));
@@ -553,10 +552,9 @@ class ExtensionPrefsFinishDelayedInstallInfo : public ExtensionPrefsTest {
public:
virtual void Initialize() OVERRIDE {
DictionaryValue dictionary;
- dictionary.SetString(extension_manifest_keys::kName, "test");
- dictionary.SetString(extension_manifest_keys::kVersion, "0.1");
- dictionary.SetString(extension_manifest_keys::kBackgroundPage,
- "background.html");
+ dictionary.SetString(manifest_keys::kName, "test");
+ dictionary.SetString(manifest_keys::kVersion, "0.1");
+ dictionary.SetString(manifest_keys::kBackgroundPage, "background.html");
scoped_refptr<Extension> extension =
prefs_.AddExtensionWithManifest(dictionary, Manifest::INTERNAL);
id_ = extension->id();
@@ -564,12 +562,11 @@ class ExtensionPrefsFinishDelayedInstallInfo : public ExtensionPrefsTest {
// Set idle info
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kName, "test");
- manifest.SetString(extension_manifest_keys::kVersion, "0.2");
+ manifest.SetString(manifest_keys::kName, "test");
+ manifest.SetString(manifest_keys::kVersion, "0.2");
scoped_ptr<ListValue> scripts(new ListValue);
scripts->AppendString("test.js");
- manifest.Set(extension_manifest_keys::kBackgroundScripts,
- scripts.release());
+ manifest.Set(manifest_keys::kBackgroundScripts, scripts.release());
base::FilePath path =
prefs_.extensions_dir().AppendASCII("test_0.2");
std::string errors;
@@ -594,15 +591,13 @@ class ExtensionPrefsFinishDelayedInstallInfo : public ExtensionPrefsTest {
ASSERT_TRUE(prefs()->ReadPrefAsDictionary(id_, "manifest", &manifest));
ASSERT_TRUE(manifest);
std::string value;
- EXPECT_TRUE(manifest->GetString(extension_manifest_keys::kName, &value));
+ EXPECT_TRUE(manifest->GetString(manifest_keys::kName, &value));
EXPECT_EQ("test", value);
- EXPECT_TRUE(manifest->GetString(extension_manifest_keys::kVersion, &value));
+ EXPECT_TRUE(manifest->GetString(manifest_keys::kVersion, &value));
EXPECT_EQ("0.2", value);
- EXPECT_FALSE(manifest->GetString(extension_manifest_keys::kBackgroundPage,
- &value));
+ EXPECT_FALSE(manifest->GetString(manifest_keys::kBackgroundPage, &value));
const ListValue* scripts;
- ASSERT_TRUE(manifest->GetList(extension_manifest_keys::kBackgroundScripts,
- &scripts));
+ ASSERT_TRUE(manifest->GetList(manifest_keys::kBackgroundScripts, &scripts));
EXPECT_EQ(1u, scripts->GetSize());
}
@@ -663,25 +658,24 @@ class ExtensionPrefsFlags : public ExtensionPrefsTest {
virtual void Initialize() OVERRIDE {
{
base::DictionaryValue dictionary;
- dictionary.SetString(extension_manifest_keys::kName, "from_webstore");
- dictionary.SetString(extension_manifest_keys::kVersion, "0.1");
+ dictionary.SetString(manifest_keys::kName, "from_webstore");
+ dictionary.SetString(manifest_keys::kVersion, "0.1");
webstore_extension_ = prefs_.AddExtensionWithManifestAndFlags(
dictionary, Manifest::INTERNAL, Extension::FROM_WEBSTORE);
}
{
base::DictionaryValue dictionary;
- dictionary.SetString(extension_manifest_keys::kName, "from_bookmark");
- dictionary.SetString(extension_manifest_keys::kVersion, "0.1");
+ dictionary.SetString(manifest_keys::kName, "from_bookmark");
+ dictionary.SetString(manifest_keys::kVersion, "0.1");
bookmark_extension_ = prefs_.AddExtensionWithManifestAndFlags(
dictionary, Manifest::INTERNAL, Extension::FROM_BOOKMARK);
}
{
base::DictionaryValue dictionary;
- dictionary.SetString(extension_manifest_keys::kName,
- "was_installed_by_default");
- dictionary.SetString(extension_manifest_keys::kVersion, "0.1");
+ dictionary.SetString(manifest_keys::kName, "was_installed_by_default");
+ dictionary.SetString(manifest_keys::kVersion, "0.1");
default_extension_ = prefs_.AddExtensionWithManifestAndFlags(
dictionary,
Manifest::INTERNAL,
@@ -711,8 +705,8 @@ PrefsPrepopulatedTestBase::PrefsPrepopulatedTestBase()
DictionaryValue simple_dict;
std::string error;
- simple_dict.SetString(extension_manifest_keys::kVersion, "1.0.0.0");
- simple_dict.SetString(extension_manifest_keys::kName, "unused");
+ simple_dict.SetString(manifest_keys::kVersion, "1.0.0.0");
+ simple_dict.SetString(manifest_keys::kName, "unused");
extension1_ = Extension::Create(
prefs_.temp_dir().AppendASCII("ext1_"),
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index a205c1b..c0ebbc5 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -145,7 +145,7 @@ using extensions::PermissionSet;
using extensions::TestExtensionSystem;
using extensions::URLPatternSet;
-namespace keys = extension_manifest_keys;
+namespace keys = extensions::manifest_keys;
namespace {
diff --git a/chrome/browser/extensions/extension_sorting_unittest.cc b/chrome/browser/extensions/extension_sorting_unittest.cc
index 6a51402..295ff6a 100644
--- a/chrome/browser/extensions/extension_sorting_unittest.cc
+++ b/chrome/browser/extensions/extension_sorting_unittest.cc
@@ -7,7 +7,7 @@
#include <map>
#include "chrome/browser/extensions/extension_prefs_unittest.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "extensions/common/manifest_constants.h"
#include "sync/api/string_ordinal.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -15,7 +15,7 @@ using extensions::Blacklist;
using extensions::Extension;
using extensions::Manifest;
-namespace keys = extension_manifest_keys;
+namespace keys = extensions::manifest_keys;
class ExtensionSortingTest : public extensions::ExtensionPrefsTest {
protected:
diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
index a849f2a..4141353 100644
--- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
@@ -9,10 +9,10 @@
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
@@ -22,7 +22,7 @@ using quota::SpecialStoragePolicy;
typedef SpecialStoragePolicy::StoragePolicy StoragePolicy;
-namespace keys = extension_manifest_keys;
+namespace keys = extensions::manifest_keys;
class ExtensionSpecialStoragePolicyTest : public testing::Test {
protected:
diff --git a/chrome/browser/extensions/installed_loader.cc b/chrome/browser/extensions/installed_loader.cc
index 62940e1..8927c45 100644
--- a/chrome/browser/extensions/installed_loader.cc
+++ b/chrome/browser/extensions/installed_loader.cc
@@ -75,7 +75,8 @@ enum ExternalItemState {
};
bool IsManifestCorrupt(const DictionaryValue* manifest) {
- if (!manifest) return false;
+ if (!manifest)
+ return false;
// Because of bug #272524 sometimes manifests got mangled in the preferences
// file, one particularly bad case resulting in having both a background page
@@ -83,10 +84,8 @@ bool IsManifestCorrupt(const DictionaryValue* manifest) {
// manifest from the extension to fix this.
const Value* background_page;
const Value* background_scripts;
- return manifest->Get(extension_manifest_keys::kBackgroundPage,
- &background_page) &&
- manifest->Get(extension_manifest_keys::kBackgroundScripts,
- &background_scripts);
+ return manifest->Get(manifest_keys::kBackgroundPage, &background_page) &&
+ manifest->Get(manifest_keys::kBackgroundScripts, &background_scripts);
}
ManifestReloadReason ShouldReloadExtensionManifest(const ExtensionInfo& info) {
diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc
index 30d6c94..1a98850 100644
--- a/chrome/browser/extensions/sandboxed_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker.cc
@@ -26,8 +26,6 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_l10n_util.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest_handlers/icons_handler.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
@@ -36,6 +34,7 @@
#include "extensions/common/constants.h"
#include "extensions/common/crx_file.h"
#include "extensions/common/id_util.h"
+#include "extensions/common/manifest_constants.h"
#include "grit/generated_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/l10n/l10n_util.h"
@@ -607,7 +606,7 @@ DictionaryValue* SandboxedUnpacker::RewriteManifestFile(
// the original manifest. We do this to ensure the manifest doesn't contain an
// exploitable bug that could be used to compromise the browser.
scoped_ptr<DictionaryValue> final_manifest(manifest.DeepCopy());
- final_manifest->SetString(extension_manifest_keys::kPublicKey, public_key_);
+ final_manifest->SetString(manifest_keys::kPublicKey, public_key_);
std::string manifest_json;
JSONStringValueSerializer serializer(&manifest_json);
diff --git a/chrome/browser/extensions/standard_management_policy_provider_unittest.cc b/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
index ae6f6e5e..862f95a 100644
--- a/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
+++ b/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
@@ -9,8 +9,8 @@
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/standard_management_policy_provider.h"
#include "chrome/browser/extensions/test_extension_prefs.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
@@ -31,8 +31,8 @@ class StandardManagementPolicyProviderTest : public testing::Test {
scoped_refptr<const Extension> CreateExtension(Manifest::Location location,
bool required) {
base::DictionaryValue values;
- values.SetString(extension_manifest_keys::kName, "test");
- values.SetString(extension_manifest_keys::kVersion, "0.1");
+ values.SetString(manifest_keys::kName, "test");
+ values.SetString(manifest_keys::kVersion, "0.1");
std::string error;
scoped_refptr<const Extension> extension = Extension::Create(
base::FilePath(), location, values, Extension::NO_FLAGS, &error);
diff --git a/chrome/browser/extensions/test_extension_prefs.cc b/chrome/browser/extensions/test_extension_prefs.cc
index 018ff42..c53f136 100644
--- a/chrome/browser/extensions/test_extension_prefs.cc
+++ b/chrome/browser/extensions/test_extension_prefs.cc
@@ -22,9 +22,9 @@
#include "chrome/browser/prefs/pref_service_mock_builder.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "sync/api/string_ordinal.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -122,18 +122,17 @@ void TestExtensionPrefs::RecreateExtensionPrefs() {
scoped_refptr<Extension> TestExtensionPrefs::AddExtension(std::string name) {
DictionaryValue dictionary;
- dictionary.SetString(extension_manifest_keys::kName, name);
- dictionary.SetString(extension_manifest_keys::kVersion, "0.1");
+ dictionary.SetString(manifest_keys::kName, name);
+ dictionary.SetString(manifest_keys::kVersion, "0.1");
return AddExtensionWithManifest(dictionary, Manifest::INTERNAL);
}
scoped_refptr<Extension> TestExtensionPrefs::AddApp(std::string name) {
DictionaryValue dictionary;
- dictionary.SetString(extension_manifest_keys::kName, name);
- dictionary.SetString(extension_manifest_keys::kVersion, "0.1");
- dictionary.SetString(extension_manifest_keys::kApp, "true");
- dictionary.SetString(extension_manifest_keys::kLaunchWebURL,
- "http://example.com");
+ dictionary.SetString(manifest_keys::kName, name);
+ dictionary.SetString(manifest_keys::kVersion, "0.1");
+ dictionary.SetString(manifest_keys::kApp, "true");
+ dictionary.SetString(manifest_keys::kLaunchWebURL, "http://example.com");
return AddExtensionWithManifest(dictionary, Manifest::INTERNAL);
}
@@ -149,7 +148,7 @@ scoped_refptr<Extension> TestExtensionPrefs::AddExtensionWithManifestAndFlags(
Manifest::Location location,
int extra_flags) {
std::string name;
- EXPECT_TRUE(manifest.GetString(extension_manifest_keys::kName, &name));
+ EXPECT_TRUE(manifest.GetString(manifest_keys::kName, &name));
base::FilePath path = extensions_dir_.AppendASCII(name);
std::string errors;
scoped_refptr<Extension> extension = Extension::Create(
diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc
index 8b8cb2d..7fc96f4 100644
--- a/chrome/browser/extensions/updater/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc
@@ -41,7 +41,6 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/omaha_query_params/omaha_query_params.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
@@ -54,6 +53,7 @@
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_utils.h"
#include "extensions/common/id_util.h"
+#include "extensions/common/manifest_constants.h"
#include "libxml/globals.h"
#include "net/base/backoff_entry.h"
#include "net/base/escape.h"
@@ -271,12 +271,12 @@ class MockService : public TestExtensionService {
Manifest::Location location) {
for (int i = 1; i <= count; i++) {
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kVersion,
+ manifest.SetString(manifest_keys::kVersion,
base::StringPrintf("%d.0.0.0", i));
- manifest.SetString(extension_manifest_keys::kName,
+ manifest.SetString(manifest_keys::kName,
base::StringPrintf("Extension %d.%d", id, i));
if (update_url)
- manifest.SetString(extension_manifest_keys::kUpdateURL, *update_url);
+ manifest.SetString(manifest_keys::kUpdateURL, *update_url);
scoped_refptr<Extension> e =
prefs_->AddExtensionWithManifest(manifest, location);
ASSERT_TRUE(e.get() != NULL);
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index f9bced0..651a28d 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -28,7 +28,6 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/omaha_query_params/omaha_query_params.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_manager.h"
@@ -42,6 +41,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/common/manifest_constants.h"
#include "net/base/escape.h"
#include "url/gurl.h"
@@ -238,8 +238,7 @@ void WebstoreInstaller::Start() {
base::Bind(&WebstoreInstaller::StartDownload, this)));
std::string name;
- if (!approval_->manifest->value()->GetString(extension_manifest_keys::kName,
- &name)) {
+ if (!approval_->manifest->value()->GetString(manifest_keys::kName, &name)) {
NOTREACHED();
}
extensions::InstallTracker* tracker =
diff --git a/chrome/browser/media_galleries/media_galleries_test_util.cc b/chrome/browser/media_galleries/media_galleries_test_util.cc
index 0f01e1e..c2a510d 100644
--- a/chrome/browser/media_galleries/media_galleries_test_util.cc
+++ b/chrome/browser/media_galleries/media_galleries_test_util.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chrome {
@@ -25,12 +25,12 @@ scoped_refptr<extensions::Extension> AddMediaGalleriesApp(
const std::vector<std::string>& media_galleries_permissions,
Profile* profile) {
scoped_ptr<DictionaryValue> manifest(new DictionaryValue);
- manifest->SetString(extension_manifest_keys::kName, name);
- manifest->SetString(extension_manifest_keys::kVersion, "0.1");
- manifest->SetInteger(extension_manifest_keys::kManifestVersion, 2);
+ manifest->SetString(extensions::manifest_keys::kName, name);
+ manifest->SetString(extensions::manifest_keys::kVersion, "0.1");
+ manifest->SetInteger(extensions::manifest_keys::kManifestVersion, 2);
ListValue* background_script_list = new ListValue;
background_script_list->Append(Value::CreateStringValue("background.js"));
- manifest->Set(extension_manifest_keys::kPlatformAppBackgroundScripts,
+ manifest->Set(extensions::manifest_keys::kPlatformAppBackgroundScripts,
background_script_list);
ListValue* permission_detail_list = new ListValue;
@@ -41,7 +41,7 @@ scoped_refptr<extensions::Extension> AddMediaGalleriesApp(
media_galleries_permission->Set("mediaGalleries", permission_detail_list);
ListValue* permission_list = new ListValue;
permission_list->Append(media_galleries_permission);
- manifest->Set(extension_manifest_keys::kPermissions, permission_list);
+ manifest->Set(extensions::manifest_keys::kPermissions, permission_list);
extensions::ExtensionPrefs* extension_prefs =
extensions::ExtensionPrefs::Get(profile);
diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
index e561288..34b6110 100644
--- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc
+++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
@@ -22,11 +22,11 @@
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/test_url_fetcher_factory.h"
@@ -232,16 +232,16 @@ scoped_refptr<Extension> CreateExtension(const std::string& name,
extensions::Manifest::Type type,
bool installed_by_default) {
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kVersion, "1.0.0.0");
- manifest.SetString(extension_manifest_keys::kName, name);
+ manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
+ manifest.SetString(extensions::manifest_keys::kName, name);
switch (type) {
case extensions::Manifest::TYPE_THEME:
- manifest.Set(extension_manifest_keys::kTheme, new DictionaryValue);
+ manifest.Set(extensions::manifest_keys::kTheme, new DictionaryValue);
break;
case extensions::Manifest::TYPE_HOSTED_APP:
- manifest.SetString(extension_manifest_keys::kLaunchWebURL,
+ manifest.SetString(extensions::manifest_keys::kLaunchWebURL,
"http://www.google.com");
- manifest.SetString(extension_manifest_keys::kUpdateURL,
+ manifest.SetString(extensions::manifest_keys::kUpdateURL,
"http://clients2.google.com/service/update2/crx");
break;
case extensions::Manifest::TYPE_EXTENSION:
@@ -250,7 +250,7 @@ scoped_refptr<Extension> CreateExtension(const std::string& name,
default:
NOTREACHED();
}
- manifest.SetString(extension_manifest_keys::kOmniboxKeyword, name);
+ manifest.SetString(extensions::manifest_keys::kOmniboxKeyword, name);
std::string error;
scoped_refptr<Extension> extension = Extension::Create(
path,
diff --git a/chrome/browser/search_engines/template_url_service_unittest.cc b/chrome/browser/search_engines/template_url_service_unittest.cc
index 42cd071..15ff76ae 100644
--- a/chrome/browser/search_engines/template_url_service_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_unittest.cc
@@ -26,12 +26,12 @@
#include "chrome/browser/search_engines/template_url_service_test_util.h"
#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_profile.h"
#include "components/webdata/common/web_database.h"
#include "content/public/test/test_browser_thread.h"
#include "extensions/common/constants.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Time;
@@ -953,10 +953,10 @@ TEST_F(TemplateURLServiceExtensionTest, ResetURLs) {
TemplateURLPrepopulateData::GetEngineType(default_provider->url()));
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kVersion, "1.0.0.0");
- manifest.SetString(extension_manifest_keys::kName, "ext1");
+ manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
+ manifest.SetString(extensions::manifest_keys::kName, "ext1");
manifest.SetString("app.launch.web_url", "http://www.google.com");
- manifest.SetString(extension_manifest_keys::kOmniboxKeyword, "ext_keyword");
+ manifest.SetString(extensions::manifest_keys::kOmniboxKeyword, "ext_keyword");
std::string error;
scoped_refptr<extensions::Extension> extension =
extensions::Extension::Create(
diff --git a/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc b/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc
index bfeeb21..3f17c4b 100644
--- a/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc
+++ b/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc
@@ -12,9 +12,9 @@
#include "chrome/browser/extensions/api/bookmarks/bookmarks_api.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "sync/util/extensions_activity.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -25,7 +25,7 @@ namespace browser_sync {
namespace {
using content::BrowserThread;
-namespace keys = extension_manifest_keys;
+namespace keys = extensions::manifest_keys;
// Create and return an extension with the given path.
scoped_refptr<Extension> MakeExtension(const std::string& name) {
diff --git a/chrome/browser/sync/test/integration/sync_extension_helper.cc b/chrome/browser/sync/test/integration/sync_extension_helper.cc
index fba06cd..393f943 100644
--- a/chrome/browser/sync/test/integration/sync_extension_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_extension_helper.cc
@@ -16,8 +16,8 @@
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "extensions/common/id_util.h"
+#include "extensions/common/manifest_constants.h"
#include "sync/api/string_ordinal.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -273,30 +273,30 @@ scoped_refptr<Extension> CreateExtension(const base::FilePath& base_dir,
const std::string& name,
Manifest::Type type) {
DictionaryValue source;
- source.SetString(extension_manifest_keys::kName, name);
+ source.SetString(extensions::manifest_keys::kName, name);
const std::string& public_key = NameToPublicKey(name);
- source.SetString(extension_manifest_keys::kPublicKey, public_key);
- source.SetString(extension_manifest_keys::kVersion, "0.0.0.0");
+ source.SetString(extensions::manifest_keys::kPublicKey, public_key);
+ source.SetString(extensions::manifest_keys::kVersion, "0.0.0.0");
switch (type) {
case Manifest::TYPE_EXTENSION:
// Do nothing.
break;
case Manifest::TYPE_THEME:
- source.Set(extension_manifest_keys::kTheme, new DictionaryValue());
+ source.Set(extensions::manifest_keys::kTheme, new DictionaryValue());
break;
case Manifest::TYPE_HOSTED_APP:
case Manifest::TYPE_LEGACY_PACKAGED_APP:
- source.Set(extension_manifest_keys::kApp, new DictionaryValue());
- source.SetString(extension_manifest_keys::kLaunchWebURL,
+ source.Set(extensions::manifest_keys::kApp, new DictionaryValue());
+ source.SetString(extensions::manifest_keys::kLaunchWebURL,
"http://www.example.com");
break;
case Manifest::TYPE_PLATFORM_APP: {
- source.Set(extension_manifest_keys::kApp, new DictionaryValue());
- source.Set(extension_manifest_keys::kPlatformAppBackground,
+ source.Set(extensions::manifest_keys::kApp, new DictionaryValue());
+ source.Set(extensions::manifest_keys::kPlatformAppBackground,
new DictionaryValue());
ListValue* scripts = new ListValue();
scripts->AppendString("main.js");
- source.Set(extension_manifest_keys::kPlatformAppBackgroundScripts,
+ source.Set(extensions::manifest_keys::kPlatformAppBackgroundScripts,
scripts);
break;
}
diff --git a/chrome/browser/themes/theme_service_unittest.cc b/chrome/browser/themes/theme_service_unittest.cc
index a9acc9a..ff45d0e 100644
--- a/chrome/browser/themes/theme_service_unittest.cc
+++ b/chrome/browser/themes/theme_service_unittest.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc
index bf91861..e5f9eb0 100644
--- a/chrome/browser/themes/theme_syncable_service_unittest.cc
+++ b/chrome/browser/themes/theme_syncable_service_unittest.cc
@@ -15,13 +15,13 @@
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/manifest_url_handler.h"
#include "chrome/common/extensions/permissions/api_permission_set.h"
#include "chrome/common/extensions/permissions/permission_set.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "sync/api/sync_error.h"
#include "sync/api/sync_error_factory_mock.h"
#include "sync/protocol/sync.pb.h"
@@ -144,10 +144,10 @@ scoped_refptr<extensions::Extension> MakeThemeExtension(
extensions::Manifest::Location location,
const string& update_url) {
DictionaryValue source;
- source.SetString(extension_manifest_keys::kName, name);
- source.Set(extension_manifest_keys::kTheme, new DictionaryValue());
- source.SetString(extension_manifest_keys::kUpdateURL, update_url);
- source.SetString(extension_manifest_keys::kVersion, "0.0.0.0");
+ source.SetString(extensions::manifest_keys::kName, name);
+ source.Set(extensions::manifest_keys::kTheme, new DictionaryValue());
+ source.SetString(extensions::manifest_keys::kUpdateURL, update_url);
+ source.SetString(extensions::manifest_keys::kVersion, "0.0.0.0");
string error;
scoped_refptr<extensions::Extension> extension =
extensions::Extension::Create(
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_unittest.cc
index 8643cc1..d18f661 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_unittest.cc
@@ -30,12 +30,12 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/models/menu_model.h"
@@ -154,10 +154,10 @@ class ChromeLauncherControllerPerAppTest : public BrowserWithTestWindowTest {
model_->AddObserver(model_observer_.get());
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kName,
+ manifest.SetString(extensions::manifest_keys::kName,
"launcher controller test extension");
- manifest.SetString(extension_manifest_keys::kVersion, "1");
- manifest.SetString(extension_manifest_keys::kDescription,
+ manifest.SetString(extensions::manifest_keys::kVersion, "1");
+ manifest.SetString(extensions::manifest_keys::kDescription,
"for testing pinned apps");
extensions::TestExtensionSystem* extension_system(
@@ -179,16 +179,16 @@ class ChromeLauncherControllerPerAppTest : public BrowserWithTestWindowTest {
&error);
// Fake gmail extension.
DictionaryValue manifest_gmail;
- manifest_gmail.SetString(extension_manifest_keys::kName,
+ manifest_gmail.SetString(extensions::manifest_keys::kName,
"Gmail launcher controller test extension");
- manifest_gmail.SetString(extension_manifest_keys::kVersion, "1");
- manifest_gmail.SetString(extension_manifest_keys::kDescription,
+ manifest_gmail.SetString(extensions::manifest_keys::kVersion, "1");
+ manifest_gmail.SetString(extensions::manifest_keys::kDescription,
"for testing pinned Gmail");
- manifest_gmail.SetString(extension_manifest_keys::kLaunchWebURL,
+ manifest_gmail.SetString(extensions::manifest_keys::kLaunchWebURL,
"https://mail.google.com/mail/ca");
ListValue* list = new ListValue();
list->Append(Value::CreateStringValue("*://mail.google.com/mail/ca"));
- manifest_gmail.Set(extension_manifest_keys::kWebURLs, list);
+ manifest_gmail.Set(extensions::manifest_keys::kWebURLs, list);
extension3_ = Extension::Create(base::FilePath(), Manifest::UNPACKED,
manifest_gmail,
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm
index 4016bbd..8b87ef3 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm
@@ -19,7 +19,7 @@
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "extensions/common/manifest_constants.h"
#include "third_party/ocmock/gtest_support.h"
#import "third_party/ocmock/OCMock/OCMock.h"
#include "ui/gfx/codec/png_codec.h"
@@ -44,7 +44,7 @@ using extensions::Extension;
@end
-namespace keys = extension_manifest_keys;
+namespace keys = extensions::manifest_keys;
class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest {
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 69eb6ef..c14adb1 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -25,12 +25,12 @@
#include "chrome/browser/ui/panels/test_panel_mouse_watcher.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_service.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/web_contents_tester.h"
+#include "extensions/common/manifest_constants.h"
#include "sync/api/string_ordinal.h"
#if defined(OS_LINUX)
@@ -547,8 +547,8 @@ scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension(
base::FilePath full_path = extension_prefs->install_directory().Append(path);
scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy());
- input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0");
- input_value->SetString(extension_manifest_keys::kName, "Sample Extension");
+ input_value->SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
+ input_value->SetString(extensions::manifest_keys::kName, "Sample Extension");
std::string error;
scoped_refptr<Extension> extension = Extension::Create(
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
index 0fc79ad..fdaa0a2 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
@@ -28,7 +28,6 @@
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/permissions/permission_set.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
@@ -36,6 +35,7 @@
#include "components/user_prefs/pref_registry_syncable.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_utils.h"
+#include "extensions/common/manifest_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -97,8 +97,8 @@ static scoped_refptr<extensions::Extension> CreateExtension(
const std::string& name,
const std::string& id) {
DictionaryValue manifest;
- manifest.SetString(extension_manifest_keys::kVersion, "1.0.0.0");
- manifest.SetString(extension_manifest_keys::kName, name);
+ manifest.SetString(extensions::manifest_keys::kVersion, "1.0.0.0");
+ manifest.SetString(extensions::manifest_keys::kName, name);
std::string error;
scoped_refptr<extensions::Extension> extension =
extensions::Extension::Create(
diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc
index 83958bf..e1e9824 100644
--- a/chrome/browser/ui/webui/policy_ui.cc
+++ b/chrome/browser/ui/webui/policy_ui.cc
@@ -63,10 +63,10 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/policy/policy_domain_descriptor.h"
#include "chrome/common/extensions/extension.h"
-#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/manifest.h"
#include "components/policy/core/common/policy_schema.h"
+#include "extensions/common/manifest_constants.h"
#endif
namespace em = enterprise_management;
@@ -568,7 +568,7 @@ void PolicyUIHandler::SendPolicyNames() const {
const extensions::Extension* extension = it->get();
// Skip this extension if it's not an enterprise extension.
if (!extension->manifest()->HasPath(
- extension_manifest_keys::kStorageManagedSchema))
+ extensions::manifest_keys::kStorageManagedSchema))
continue;
base::DictionaryValue* extension_value = new base::DictionaryValue;
extension_value->SetString("name", extension->name());
@@ -615,7 +615,7 @@ void PolicyUIHandler::SendPolicyValues() const {
const extensions::Extension* extension = it->get();
// Skip this extension if it's not an enterprise extension.
if (!extension->manifest()->HasPath(
- extension_manifest_keys::kStorageManagedSchema))
+ extensions::manifest_keys::kStorageManagedSchema))
continue;
base::DictionaryValue* extension_policies = new base::DictionaryValue;
policy::PolicyNamespace policy_namespace = policy::PolicyNamespace(