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

Unified Diff: chrome/common/extensions/extension_unpacker.cc

Issue 3207002: FBTF: Forward declare and move constructors in chrome/common/extensions/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Win fixes Created 10 years, 4 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/common/extensions/extension_unpacker.cc
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index 014a0e3a31b10f380cc0bc75f937d8094ce85aa9..23950c5951a08e3475f0f30705792f600a61f4da 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -44,9 +44,7 @@ const char* kPathNamesMustBeAbsoluteOrLocalError =
// A limit to stop us passing dangerously large canvases to the browser.
const int kMaxImageCanvas = 4096 * 4096;
-} // namespace
-
-static SkBitmap DecodeImage(const FilePath& path) {
+SkBitmap DecodeImage(const FilePath& path) {
// Read the file from disk.
std::string file_contents;
if (!file_util::PathExists(path) ||
@@ -65,7 +63,7 @@ static SkBitmap DecodeImage(const FilePath& path) {
return bitmap;
}
-static bool PathContainsParentDirectory(const FilePath& path) {
+bool PathContainsParentDirectory(const FilePath& path) {
const FilePath::StringType kSeparators(FilePath::kSeparators);
const FilePath::StringType kParentDirectory(FilePath::kParentDirectory);
const size_t npos = FilePath::StringType::npos;
@@ -85,6 +83,15 @@ static bool PathContainsParentDirectory(const FilePath& path) {
return false;
}
+} // namespace
+
+ExtensionUnpacker::ExtensionUnpacker(const FilePath& extension_path)
+ : extension_path_(extension_path) {
+}
+
+ExtensionUnpacker::~ExtensionUnpacker() {
+}
+
DictionaryValue* ExtensionUnpacker::ReadManifest() {
FilePath manifest_path =
temp_install_dir_.Append(Extension::kManifestFilename);

Powered by Google App Engine
This is Rietveld 408576698