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

Unified Diff: chrome/browser/extensions/component_loader.h

Issue 2197483004: [Extensions] rm unnecessary GetRawDataResource().as_string() to reduce string copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Devlin@ Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader.h
diff --git a/chrome/browser/extensions/component_loader.h b/chrome/browser/extensions/component_loader.h
index e64a90fcb91a99778beb1c8d637fc5ab09c4c454..c9d8f6545e63007b3ac23eba25497241c0a172c2 100644
--- a/chrome/browser/extensions/component_loader.h
+++ b/chrome/browser/extensions/component_loader.h
@@ -13,6 +13,7 @@
#include "base/callback_forward.h"
#include "base/files/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -91,11 +92,6 @@ class ComponentLoader {
// Similar to above but adds the default component extensions for kiosk mode.
void AddDefaultComponentExtensionsForKioskMode(bool skip_session_components);
- // Parse the given JSON manifest. Returns NULL if it cannot be parsed, or if
- // if the result is not a DictionaryValue.
- base::DictionaryValue* ParseManifest(
- const std::string& manifest_contents) const;
-
// Clear the list of registered extensions.
void ClearAllRegistered();
@@ -115,6 +111,8 @@ class ComponentLoader {
}
private:
+ FRIEND_TEST_ALL_PREFIXES(ComponentLoaderTest, ParseManifest);
+
// Information about a registered component extension.
struct ComponentExtensionInfo {
ComponentExtensionInfo(const base::DictionaryValue* manifest,
@@ -130,6 +128,11 @@ class ComponentLoader {
std::string extension_id;
};
+ // Parses the given JSON manifest. Returns nullptr if it cannot be parsed or
+ // if the result is not a DictionaryValue.
+ base::DictionaryValue* ParseManifest(
+ base::StringPiece manifest_contents) const;
+
std::string Add(const std::string& manifest_contents,
const base::FilePath& root_directory,
bool skip_whitelist);
« no previous file with comments | « no previous file | chrome/browser/extensions/component_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698