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

Side by Side Diff: chrome/browser/extensions/chrome_extension_host_delegate.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: Rebase and fix header 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 "chrome/browser/extensions/chrome_extension_host_delegate.h" 5 #include "chrome/browser/extensions/chrome_extension_host_delegate.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_tab_util.h" 10 #include "chrome/browser/extensions/extension_tab_util.h"
11 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 11 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
12 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 12 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
13 #include "components/app_modal/javascript_dialog_manager.h" 13 #include "components/app_modal/javascript_dialog_manager.h"
14 #include "extensions/browser/extension_host.h" 14 #include "extensions/browser/extension_host.h"
15 #include "extensions/browser/extension_system.h" 15 #include "extensions/browser/extension_system.h"
16 #include "extensions/browser/load_monitoring_extension_host_queue.h" 16 #include "extensions/browser/load_monitoring_extension_host_queue.h"
17 #include "extensions/browser/serial_extension_host_queue.h" 17 #include "extensions/browser/serial_extension_host_queue.h"
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 namespace { 21 namespace {
22 22
23 // Singleton for GetExtensionHostQueue(). 23 // Singleton for GetExtensionHostQueue().
24 struct QueueWrapper { 24 struct QueueWrapper {
25 QueueWrapper() { 25 QueueWrapper() {
26 queue.reset(new LoadMonitoringExtensionHostQueue( 26 queue.reset(new LoadMonitoringExtensionHostQueue(
27 scoped_ptr<ExtensionHostQueue>(new SerialExtensionHostQueue()))); 27 std::unique_ptr<ExtensionHostQueue>(new SerialExtensionHostQueue())));
28 } 28 }
29 scoped_ptr<ExtensionHostQueue> queue; 29 std::unique_ptr<ExtensionHostQueue> queue;
30 }; 30 };
31 base::LazyInstance<QueueWrapper> g_queue = LAZY_INSTANCE_INITIALIZER; 31 base::LazyInstance<QueueWrapper> g_queue = LAZY_INSTANCE_INITIALIZER;
32 32
33 } // namespace 33 } // namespace
34 34
35 ChromeExtensionHostDelegate::ChromeExtensionHostDelegate() {} 35 ChromeExtensionHostDelegate::ChromeExtensionHostDelegate() {}
36 36
37 ChromeExtensionHostDelegate::~ChromeExtensionHostDelegate() {} 37 ChromeExtensionHostDelegate::~ChromeExtensionHostDelegate() {}
38 38
39 void ChromeExtensionHostDelegate::OnExtensionHostCreated( 39 void ChromeExtensionHostDelegate::OnExtensionHostCreated(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return MediaCaptureDevicesDispatcher::GetInstance() 81 return MediaCaptureDevicesDispatcher::GetInstance()
82 ->CheckMediaAccessPermission( 82 ->CheckMediaAccessPermission(
83 web_contents, security_origin, type, extension); 83 web_contents, security_origin, type, extension);
84 } 84 }
85 85
86 ExtensionHostQueue* ChromeExtensionHostDelegate::GetExtensionHostQueue() const { 86 ExtensionHostQueue* ChromeExtensionHostDelegate::GetExtensionHostQueue() const {
87 return g_queue.Get().queue.get(); 87 return g_queue.Get().queue.get();
88 } 88 }
89 89
90 } // namespace extensions 90 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698