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

Unified Diff: chrome/common/extensions/extension_file_util.h

Issue 11198067: Move extension unpack intermediate dir to Extensions/Temp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows Created 8 years, 2 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_file_util.h
diff --git a/chrome/common/extensions/extension_file_util.h b/chrome/common/extensions/extension_file_util.h
index 49a13cc3a61c5173f4463dac2f67c196ed95dcd6..3ef8380b7372c608f2a0e73778591c8910421441 100644
--- a/chrome/common/extensions/extension_file_util.h
+++ b/chrome/common/extensions/extension_file_util.h
@@ -25,10 +25,6 @@ class MessageBundle;
// Utilities for manipulating the on-disk storage of extensions.
namespace extension_file_util {
-// The name of the directory inside the profile that we store installed
-// extension in.
-extern const char kInstallDirectoryName[];
-
// Copies |unpacked_source_dir| into the right location under |extensions_dir|.
// The destination directory is returned on success, or empty path is returned
// on failure.
@@ -119,11 +115,12 @@ FilePath ExtensionURLToRelativeFilePath(const GURL& url);
// points a file outside of root, this function will return empty FilePath.
FilePath ExtensionResourceURLToFilePath(const GURL& url, const FilePath& root);
-// Get a path to a temp directory for unpacking an extension.
-// This is essentially PathService::Get(chrome::DIR_USER_DATA_TEMP, ...),
-// with a histogram that allows us to understand why it is failing.
-// Return an empty file path on failure.
-FilePath GetUserDataTempDir();
+// Returns a path to a temporary directory for unpacking an extension that will
+// be installed into |all_extensions_dir|. Creates the directory if necessary.
+// The directory will be on the same file system as |all_extensions_dir| so
+// that the extension directory can be efficiently renamed into place. Returns
+// an empty file path on failure.
+FilePath GetExtensionsTempDir(const FilePath& all_extensions_dir);
// Helper function to delete files. This is used to avoid ugly casts which
// would be necessary with PostMessage since file_util::Delete is overloaded.

Powered by Google App Engine
This is Rietveld 408576698