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

Side by Side Diff: chrome/browser/extensions/extension_service_test_with_install.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_service_test_with_install.h" 5 #include "chrome/browser/extensions/extension_service_test_with_install.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_creator.h" 10 #include "chrome/browser/extensions/extension_creator.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Use the existing pem key, if provided. 80 // Use the existing pem key, if provided.
81 base::FilePath pem_output_path; 81 base::FilePath pem_output_path;
82 if (pem_path.value().empty()) { 82 if (pem_path.value().empty()) {
83 pem_output_path = crx_path.DirName().AppendASCII("temp.pem"); 83 pem_output_path = crx_path.DirName().AppendASCII("temp.pem");
84 } else { 84 } else {
85 ASSERT_TRUE(base::PathExists(pem_path)); 85 ASSERT_TRUE(base::PathExists(pem_path));
86 } 86 }
87 87
88 ASSERT_TRUE(base::DeleteFile(crx_path, false)); 88 ASSERT_TRUE(base::DeleteFile(crx_path, false));
89 89
90 scoped_ptr<ExtensionCreator> creator(new ExtensionCreator()); 90 std::unique_ptr<ExtensionCreator> creator(new ExtensionCreator());
91 ASSERT_TRUE(creator->Run(dir_path, 91 ASSERT_TRUE(creator->Run(dir_path,
92 crx_path, 92 crx_path,
93 pem_path, 93 pem_path,
94 pem_output_path, 94 pem_output_path,
95 ExtensionCreator::kOverwriteCRX)); 95 ExtensionCreator::kOverwriteCRX));
96 96
97 ASSERT_TRUE(base::PathExists(crx_path)); 97 ASSERT_TRUE(base::PathExists(crx_path));
98 } 98 }
99 99
100 const Extension* ExtensionServiceTestWithInstall::PackAndInstallCRX( 100 const Extension* ExtensionServiceTestWithInstall::PackAndInstallCRX(
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 content::WindowedNotificationObserver observer( 422 content::WindowedNotificationObserver observer(
423 extensions::NOTIFICATION_CRX_INSTALLER_DONE, 423 extensions::NOTIFICATION_CRX_INSTALLER_DONE,
424 content::Source<extensions::CrxInstaller>(installer.get())); 424 content::Source<extensions::CrxInstaller>(installer.get()));
425 425
426 installer->InstallCrx(crx_path); 426 installer->InstallCrx(crx_path);
427 427
428 observer.Wait(); 428 observer.Wait();
429 } 429 }
430 430
431 } // namespace extensions 431 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698