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

Side by Side Diff: extensions/shell/browser/shell_extension_system.cc

Issue 1908953003: Convert //extensions/{common,shell} 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/shell_extension_system.h" 5 #include "extensions/shell/browser/shell_extension_system.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/memory/ptr_util.h"
11 #include "content/public/browser/browser_context.h" 12 #include "content/public/browser/browser_context.h"
12 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
13 #include "content/public/browser/notification_details.h" 14 #include "content/public/browser/notification_details.h"
14 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
15 #include "content/public/browser/notification_source.h" 16 #include "content/public/browser/notification_source.h"
16 #include "extensions/browser/api/app_runtime/app_runtime_api.h" 17 #include "extensions/browser/api/app_runtime/app_runtime_api.h"
17 #include "extensions/browser/extension_prefs.h" 18 #include "extensions/browser/extension_prefs.h"
18 #include "extensions/browser/extension_registry.h" 19 #include "extensions/browser/extension_registry.h"
19 #include "extensions/browser/info_map.h" 20 #include "extensions/browser/info_map.h"
20 #include "extensions/browser/notification_types.h" 21 #include "extensions/browser/notification_types.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 172 }
172 173
173 const OneShotEvent& ShellExtensionSystem::ready() const { 174 const OneShotEvent& ShellExtensionSystem::ready() const {
174 return ready_; 175 return ready_;
175 } 176 }
176 177
177 ContentVerifier* ShellExtensionSystem::content_verifier() { 178 ContentVerifier* ShellExtensionSystem::content_verifier() {
178 return nullptr; 179 return nullptr;
179 } 180 }
180 181
181 scoped_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions( 182 std::unique_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions(
182 const Extension* extension) { 183 const Extension* extension) {
183 return make_scoped_ptr(new ExtensionSet()); 184 return base::WrapUnique(new ExtensionSet());
184 } 185 }
185 186
186 void ShellExtensionSystem::InstallUpdate(const std::string& extension_id, 187 void ShellExtensionSystem::InstallUpdate(const std::string& extension_id,
187 const base::FilePath& temp_dir) { 188 const base::FilePath& temp_dir) {
188 NOTREACHED(); 189 NOTREACHED();
189 base::DeleteFile(temp_dir, true /* recursive */); 190 base::DeleteFile(temp_dir, true /* recursive */);
190 } 191 }
191 192
192 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( 193 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts(
193 scoped_refptr<Extension> extension) { 194 scoped_refptr<Extension> extension) {
194 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); 195 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_);
195 registry->AddReady(extension); 196 registry->AddReady(extension);
196 registry->TriggerOnReady(extension.get()); 197 registry->TriggerOnReady(extension.get());
197 } 198 }
198 199
199 } // namespace extensions 200 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_extension_system.h ('k') | extensions/shell/browser/shell_native_app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698