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

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

Issue 217233004: Revert of Remove ExtensionService Garbage-Collecting methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7139600ccd305a30328000aa4869b91260330d94..3e18f29dc8c9d6ed55faa082c7a5faea04945e04 100644
--- a/chrome/common/extensions/extension_file_util.h
+++ b/chrome/common/extensions/extension_file_util.h
@@ -8,7 +8,6 @@
#include <map>
#include <string>
-#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "chrome/common/extensions/message_bundle.h"
#include "extensions/common/manifest.h"
@@ -28,8 +27,6 @@
// Utilities for manipulating the on-disk storage of extensions.
namespace extension_file_util {
-
-extern const base::FilePath::CharType kTempDirectoryName[];
// Copies |unpacked_source_dir| into the right location under |extensions_dir|.
// The destination directory is returned on success, or empty path is returned
@@ -94,6 +91,23 @@
std::vector<base::FilePath> FindPrivateKeyFiles(
const base::FilePath& extension_dir);
+// Cleans up the extension install directory. It can end up with garbage in it
+// if extensions can't initially be removed when they are uninstalled (eg if a
+// file is in use).
+//
+// |extensions_dir| is the install directory to look in. |extension_paths| is a
+// map from extension id to full installation path.
+//
+// Obsolete version directories are removed, as are directories that aren't
+// found in |extension_paths|.
+//
+// The "Temp" directory that is used during extension installation only gets
+// removed if |clean_temp_dir| is true.
+void GarbageCollectExtensions(
+ const base::FilePath& extensions_dir,
+ const std::multimap<std::string, base::FilePath>& extension_paths,
+ bool clean_temp_dir);
+
// Loads extension message catalogs and returns message bundle.
// Returns NULL on error, or if extension is not localized.
extensions::MessageBundle* LoadMessageBundle(
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698