Chromium Code Reviews| Index: chrome/browser/extensions/chrome_test_extension_loader.cc |
| diff --git a/chrome/browser/extensions/chrome_test_extension_loader.cc b/chrome/browser/extensions/chrome_test_extension_loader.cc |
| index 9bc6272ed4406d049d10d04c4aaf9a6866a45551..aef672fd5907fcd6fa596c0eca47eef021934328 100644 |
| --- a/chrome/browser/extensions/chrome_test_extension_loader.cc |
| +++ b/chrome/browser/extensions/chrome_test_extension_loader.cc |
| @@ -104,6 +104,10 @@ base::FilePath ChromeTestExtensionLoader::PackExtension( |
| return base::FilePath(); |
| } |
| + if (!temp_dir_.CreateUniqueTempDir()) { |
|
karandeepb
2017/06/09 22:53:36
How did this work before w/o this?
Devlin
2017/06/13 16:14:44
It didn't - turns out, we never exercised this cod
|
| + ADD_FAILURE() << "Could not create unique temp dir."; |
| + return base::FilePath(); |
| + } |
| base::FilePath crx_path = temp_dir_.GetPath().AppendASCII("temp.crx"); |
| if (base::PathExists(crx_path)) { |
| ADD_FAILURE() << "Crx path exists: " << crx_path.value() |
| @@ -118,7 +122,8 @@ base::FilePath ChromeTestExtensionLoader::PackExtension( |
| return base::FilePath(); |
| } |
| - base::FilePath* pem_path_to_use = &fallback_pem_path; |
|
karandeepb
2017/06/09 22:53:36
Isn't this also correct? This change is just for m
Devlin
2017/06/13 16:14:44
It's actually not correct - if the path_to_use isn
|
| + base::FilePath empty_path; |
| + base::FilePath* pem_path_to_use = &empty_path; |
| if (!pem_path_.empty()) { |
| pem_path_to_use = &pem_path_; |
| if (!base::PathExists(pem_path_)) { |