Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3249)

Unified Diff: chrome/browser/extensions/external_policy_loader.cc

Issue 10692168: Moved ExternalExtensionLoaders/Providers into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Even later master Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/external_policy_loader.cc
diff --git a/chrome/browser/extensions/external_policy_extension_loader.cc b/chrome/browser/extensions/external_policy_loader.cc
similarity index 89%
rename from chrome/browser/extensions/external_policy_extension_loader.cc
rename to chrome/browser/extensions/external_policy_loader.cc
index c0a9bf9567f87a536e23253ee197c21cd5f71a78..a93fe0f6ff37ca9882e8b9672f9c019c1f7391b8 100644
--- a/chrome/browser/extensions/external_policy_extension_loader.cc
+++ b/chrome/browser/extensions/external_policy_loader.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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/external_policy_extension_loader.h"
+#include "chrome/browser/extensions/external_policy_loader.h"
#include "base/logging.h"
#include "base/values.h"
@@ -16,6 +16,8 @@
#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
+namespace extensions {
+
namespace {
// Check an extension ID and an URL to be syntactically correct.
@@ -26,7 +28,7 @@ bool CheckExtension(const std::string& id, const std::string& update_url) {
<< "extension: " << update_url;
return false;
}
- if (!extensions::Extension::IdIsValid(id)) {
+ if (!Extension::IdIsValid(id)) {
LOG(WARNING) << "Policy specifies invalid ID for external "
<< "extension: " << id;
return false;
@@ -36,8 +38,7 @@ bool CheckExtension(const std::string& id, const std::string& update_url) {
} // namespace
-ExternalPolicyExtensionLoader::ExternalPolicyExtensionLoader(
- Profile* profile)
+ExternalPolicyLoader::ExternalPolicyLoader(Profile* profile)
: profile_(profile) {
pref_change_registrar_.Init(profile_->GetPrefs());
pref_change_registrar_.Add(prefs::kExtensionInstallForceList, this);
@@ -46,7 +47,7 @@ ExternalPolicyExtensionLoader::ExternalPolicyExtensionLoader(
content::Source<Profile>(profile_));
}
-void ExternalPolicyExtensionLoader::StartLoading() {
+void ExternalPolicyLoader::StartLoading() {
const ListValue* forcelist =
profile_->GetPrefs()->GetList(prefs::kExtensionInstallForceList);
DictionaryValue* result = new DictionaryValue();
@@ -73,7 +74,7 @@ void ExternalPolicyExtensionLoader::StartLoading() {
LoadFinished();
}
-void ExternalPolicyExtensionLoader::Observe(
+void ExternalPolicyLoader::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
@@ -102,3 +103,5 @@ void ExternalPolicyExtensionLoader::Observe(
NOTREACHED() << "Unexpected notification type.";
}
}
+
+} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/external_policy_loader.h ('k') | chrome/browser/extensions/external_policy_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698