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

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

Issue 2314363002: extensions: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Comment addressed Created 4 years, 3 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/browser/extensions/test_extension_dir.h ('k') | chrome/browser/extensions/test_extension_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/test_extension_dir.cc
diff --git a/chrome/browser/extensions/test_extension_dir.cc b/chrome/browser/extensions/test_extension_dir.cc
index ec6a5280d7ec9e54fad73eecf3ea604db9bec782..dc7e2926e2fc562492515ef0ef6b902e7097730b 100644
--- a/chrome/browser/extensions/test_extension_dir.cc
+++ b/chrome/browser/extensions/test_extension_dir.cc
@@ -35,10 +35,9 @@ void TestExtensionDir::WriteManifestWithSingleQuotes(
void TestExtensionDir::WriteFile(const base::FilePath::StringType& filename,
base::StringPiece contents) {
- EXPECT_EQ(
- base::checked_cast<int>(contents.size()),
- base::WriteFile(
- dir_.path().Append(filename), contents.data(), contents.size()));
+ EXPECT_EQ(base::checked_cast<int>(contents.size()),
+ base::WriteFile(dir_.GetPath().Append(filename), contents.data(),
+ contents.size()));
}
// This function packs the extension into a .crx, and returns the path to that
@@ -46,18 +45,15 @@ void TestExtensionDir::WriteFile(const base::FilePath::StringType& filename,
base::FilePath TestExtensionDir::Pack() {
ExtensionCreator creator;
base::FilePath crx_path =
- crx_dir_.path().Append(FILE_PATH_LITERAL("ext.crx"));
+ crx_dir_.GetPath().Append(FILE_PATH_LITERAL("ext.crx"));
base::FilePath pem_path =
- crx_dir_.path().Append(FILE_PATH_LITERAL("ext.pem"));
+ crx_dir_.GetPath().Append(FILE_PATH_LITERAL("ext.pem"));
base::FilePath pem_in_path, pem_out_path;
if (base::PathExists(pem_path))
pem_in_path = pem_path;
else
pem_out_path = pem_path;
- if (!creator.Run(dir_.path(),
- crx_path,
- pem_in_path,
- pem_out_path,
+ if (!creator.Run(dir_.GetPath(), crx_path, pem_in_path, pem_out_path,
ExtensionCreator::kOverwriteCRX)) {
ADD_FAILURE()
<< "ExtensionCreator::Run() failed: " << creator.error_message();
@@ -70,4 +66,8 @@ base::FilePath TestExtensionDir::Pack() {
return crx_path;
}
+base::FilePath TestExtensionDir::UnpackedPath() {
+ return dir_.GetPath();
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/test_extension_dir.h ('k') | chrome/browser/extensions/test_extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698