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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/webui/extensions/extension_settings_browsertest.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_browsertest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 Profile* profile = GetProfile(); 144 Profile* profile = GetProfile();
145 ExtensionService* service = 145 ExtensionService* service =
146 extensions::ExtensionSystem::Get(profile)->extension_service(); 146 extensions::ExtensionSystem::Get(profile)->extension_service();
147 extensions::ExtensionRegistry* registry = 147 extensions::ExtensionRegistry* registry =
148 extensions::ExtensionRegistry::Get(profile); 148 extensions::ExtensionRegistry::Get(profile);
149 service->set_show_extensions_prompts(false); 149 service->set_show_extensions_prompts(false);
150 size_t num_before = registry->enabled_extensions().size(); 150 size_t num_before = registry->enabled_extensions().size();
151 { 151 {
152 extensions::ScopedTestDialogAutoConfirm auto_confirm( 152 extensions::ScopedTestDialogAutoConfirm auto_confirm(
153 extensions::ScopedTestDialogAutoConfirm::ACCEPT); 153 extensions::ScopedTestDialogAutoConfirm::ACCEPT);
154 scoped_ptr<ExtensionInstallPrompt> install_ui( 154 std::unique_ptr<ExtensionInstallPrompt> install_ui(
155 new ExtensionInstallPrompt( 155 new ExtensionInstallPrompt(
156 browser()->tab_strip_model()->GetActiveWebContents())); 156 browser()->tab_strip_model()->GetActiveWebContents()));
157 157
158 base::FilePath crx_path = path; 158 base::FilePath crx_path = path;
159 DCHECK(crx_path.Extension() == FILE_PATH_LITERAL(".crx")); 159 DCHECK(crx_path.Extension() == FILE_PATH_LITERAL(".crx"));
160 if (crx_path.empty()) 160 if (crx_path.empty())
161 return nullptr; 161 return nullptr;
162 162
163 scoped_refptr<extensions::CrxInstaller> installer( 163 scoped_refptr<extensions::CrxInstaller> installer(
164 extensions::CrxInstaller::Create(service, std::move(install_ui))); 164 extensions::CrxInstaller::Create(service, std::move(install_ui)));
(...skipping 30 matching lines...) Expand all
195 iter != errors->end(); ++iter) 195 iter != errors->end(); ++iter)
196 VLOG(1) << *iter; 196 VLOG(1) << *iter;
197 197
198 return nullptr; 198 return nullptr;
199 } 199 }
200 200
201 if (!observer_->WaitForExtensionViewsToLoad()) 201 if (!observer_->WaitForExtensionViewsToLoad())
202 return nullptr; 202 return nullptr;
203 return service->GetExtensionById(last_loaded_extension_id(), false); 203 return service->GetExtensionById(last_loaded_extension_id(), false);
204 } 204 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698