summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 09:39:47 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 09:39:47 +0000
commit1ff3fac6be85e0382e9e0362df12464afb0fc2d3 (patch)
tree6a0cec570976bed89c557c62a3d0301dd6fdf181
parent665d1d57eff29f1757e16e3891464d6cb5532e22 (diff)
downloadchromium_src-1ff3fac6be85e0382e9e0362df12464afb0fc2d3.zip
chromium_src-1ff3fac6be85e0382e9e0362df12464afb0fc2d3.tar.gz
chromium_src-1ff3fac6be85e0382e9e0362df12464afb0fc2d3.tar.bz2
Move extensions::admin_policy code to extensions/browser.
Also temporarily permit inclusion of grit/generated_resources.h from within extensions/browser. (Longer-term, we'll want to move resources needed by extensions/ into their own file.) BUG=313284 Review URL: https://codereview.chromium.org/64643003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233847 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/extension_prefs.cc2
-rw-r--r--chrome/browser/extensions/standard_management_policy_provider.cc2
-rw-r--r--chrome/chrome_browser_extensions.gypi2
-rw-r--r--chrome/chrome_tests_unit.gypi2
-rw-r--r--extensions/browser/DEPS1
-rw-r--r--extensions/browser/admin_policy.cc (renamed from chrome/browser/extensions/admin_policy.cc)4
-rw-r--r--extensions/browser/admin_policy.h (renamed from chrome/browser/extensions/admin_policy.h)12
-rw-r--r--extensions/browser/admin_policy_unittest.cc (renamed from chrome/browser/extensions/admin_policy_unittest.cc)4
-rw-r--r--extensions/extensions.gyp3
9 files changed, 16 insertions, 16 deletions
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 29b7c6a..8f3a3d0 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -12,7 +12,6 @@
#include "base/strings/string_util.h"
#include "base/value_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/extensions/admin_policy.h"
#include "chrome/browser/extensions/api/content_settings/content_settings_store.h"
#include "chrome/browser/extensions/api/preference/preference_api.h"
#include "chrome/browser/extensions/event_router.h"
@@ -28,6 +27,7 @@
#include "chrome/common/url_constants.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "content/public/browser/notification_service.h"
+#include "extensions/browser/admin_policy.h"
#include "extensions/browser/pref_names.h"
#include "extensions/common/manifest.h"
#include "extensions/common/permissions/permission_set.h"
diff --git a/chrome/browser/extensions/standard_management_policy_provider.cc b/chrome/browser/extensions/standard_management_policy_provider.cc
index 31c56c9..2bdaa94 100644
--- a/chrome/browser/extensions/standard_management_policy_provider.cc
+++ b/chrome/browser/extensions/standard_management_policy_provider.cc
@@ -5,11 +5,11 @@
#include "chrome/browser/extensions/standard_management_policy_provider.h"
#include "base/prefs/pref_service.h"
-#include "chrome/browser/extensions/admin_policy.h"
#include "chrome/browser/extensions/blacklist.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
+#include "extensions/browser/admin_policy.h"
namespace extensions {
diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi
index 7047de4..22596bf 100644
--- a/chrome/chrome_browser_extensions.gypi
+++ b/chrome/chrome_browser_extensions.gypi
@@ -93,8 +93,6 @@
'browser/extensions/activity_log/uma_policy.h',
'browser/extensions/activity_log/web_request_constants.cc',
'browser/extensions/activity_log/web_request_constants.h',
- 'browser/extensions/admin_policy.cc',
- 'browser/extensions/admin_policy.h',
'browser/extensions/api/activity_log_private/activity_log_private_api.cc',
'browser/extensions/api/activity_log_private/activity_log_private_api.h',
'browser/extensions/api/api_function.cc',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index a1ddf6d..e61e7c9 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -521,6 +521,7 @@
'../apps/shell_window_geometry_cache_unittest.cc',
'../components/autofill/content/renderer/test_password_autofill_agent.cc',
'../components/autofill/content/renderer/test_password_autofill_agent.h',
+ '../extensions/browser/admin_policy_unittest.cc',
'../extensions/browser/file_highlighter_unittest.cc',
'../extensions/browser/file_reader_unittest.cc',
'../extensions/browser/lazy_background_task_queue_unittest.cc',
@@ -794,7 +795,6 @@
'browser/extensions/activity_log/database_string_table_unittest.cc',
'browser/extensions/activity_log/fullstream_ui_policy_unittest.cc',
'browser/extensions/activity_log/uma_policy_unittest.cc',
- 'browser/extensions/admin_policy_unittest.cc',
'browser/extensions/api/activity_log_private/activity_log_private_api_unittest.cc',
'browser/extensions/api/alarms/alarms_api_unittest.cc',
'browser/extensions/api/api_resource_manager_unittest.cc',
diff --git a/extensions/browser/DEPS b/extensions/browser/DEPS
index 737b8eb..0f912bf 100644
--- a/extensions/browser/DEPS
+++ b/extensions/browser/DEPS
@@ -16,6 +16,7 @@ include_rules = [
"+chrome/common/extensions/background_info.h",
"+chrome/common/extensions/extension.h",
"+chrome/common/extensions/extension_messages.h",
+ "+grit/generated_resources.h",
]
specific_include_rules = {
diff --git a/chrome/browser/extensions/admin_policy.cc b/extensions/browser/admin_policy.cc
index 29b9781..2cc0b57 100644
--- a/chrome/browser/extensions/admin_policy.cc
+++ b/extensions/browser/admin_policy.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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 "chrome/browser/extensions/admin_policy.h"
+#include "extensions/browser/admin_policy.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/extensions/extension.h"
diff --git a/chrome/browser/extensions/admin_policy.h b/extensions/browser/admin_policy.h
index 0f88958..ea32ee7 100644
--- a/chrome/browser/extensions/admin_policy.h
+++ b/extensions/browser/admin_policy.h
@@ -1,20 +1,18 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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 CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_
-#define CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_
+#ifndef EXTENSIONS_BROWSER_ADMIN_POLICY_H_
+#define EXTENSIONS_BROWSER_ADMIN_POLICY_H_
#include "base/values.h"
-#include "chrome/common/extensions/extension.h"
namespace extensions {
+
class Extension;
-}
// Functions for providing information about the extension whitelist,
// blacklist, and forcelist imposed by admin policy.
-namespace extensions {
namespace admin_policy {
// Checks if extensions are blacklisted by default, by policy. When true, this
@@ -41,4 +39,4 @@ bool MustRemainEnabled(const Extension* extension, string16* error);
} // namespace
} // namespace
-#endif // CHROME_BROWSER_EXTENSIONS_ADMIN_POLICY_H_
+#endif // EXTENSIONS_BROWSER_ADMIN_POLICY_H_
diff --git a/chrome/browser/extensions/admin_policy_unittest.cc b/extensions/browser/admin_policy_unittest.cc
index 6774f20..02d606d 100644
--- a/chrome/browser/extensions/admin_policy_unittest.cc
+++ b/extensions/browser/admin_policy_unittest.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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 "chrome/browser/extensions/admin_policy.h"
+#include "extensions/browser/admin_policy.h"
#include "base/values.h"
#include "chrome/common/extensions/extension.h"
diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp
index 98d502d..6cef0ee 100644
--- a/extensions/extensions.gyp
+++ b/extensions/extensions.gyp
@@ -130,8 +130,11 @@
'include_dirs': [
'..',
'<(INTERMEDIATE_DIR)',
+ '<(SHARED_INTERMEDIATE_DIR)/chrome',
],
'sources': [
+ 'browser/admin_policy.cc',
+ 'browser/admin_policy.h',
'browser/extension_prefs_scope.h',
'browser/extension_error.cc',
'browser/extension_error.h',