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

Side by Side Diff: chrome/browser/extensions/extension_creator.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_creator.h" 5 #include "chrome/browser/extensions/extension_creator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 return false; 314 return false;
315 315
316 base::ScopedTempDir temp_dir; 316 base::ScopedTempDir temp_dir;
317 if (!temp_dir.CreateUniqueTempDir()) 317 if (!temp_dir.CreateUniqueTempDir())
318 return false; 318 return false;
319 319
320 // Zip up the extension. 320 // Zip up the extension.
321 base::FilePath zip_path; 321 base::FilePath zip_path;
322 std::vector<uint8_t> signature; 322 std::vector<uint8_t> signature;
323 bool result = false; 323 bool result = false;
324 if (CreateZip(extension_dir, temp_dir.path(), &zip_path) && 324 if (CreateZip(extension_dir, temp_dir.GetPath(), &zip_path) &&
325 SignZip(zip_path, key_pair.get(), &signature) && 325 SignZip(zip_path, key_pair.get(), &signature) &&
326 WriteCRX(zip_path, key_pair.get(), signature, crx_path)) { 326 WriteCRX(zip_path, key_pair.get(), signature, crx_path)) {
327 result = true; 327 result = true;
328 } 328 }
329 329
330 base::DeleteFile(zip_path, false); 330 base::DeleteFile(zip_path, false);
331 return result; 331 return result;
332 } 332 }
333 333
334 } // namespace extensions 334 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_creator_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698