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

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

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « extensions/browser/api/bluetooth/bluetooth_event_router.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return quota_service_.get(); 144 return quota_service_.get();
145 } 145 }
146 146
147 AppSorting* ShellExtensionSystem::app_sorting() { 147 AppSorting* ShellExtensionSystem::app_sorting() {
148 return app_sorting_.get(); 148 return app_sorting_.get();
149 } 149 }
150 150
151 void ShellExtensionSystem::RegisterExtensionWithRequestContexts( 151 void ShellExtensionSystem::RegisterExtensionWithRequestContexts(
152 const Extension* extension, 152 const Extension* extension,
153 const base::Closure& callback) { 153 const base::Closure& callback) {
154 BrowserThread::PostTaskAndReply(BrowserThread::IO, FROM_HERE, 154 BrowserThread::PostTaskAndReply(
155 base::Bind(&InfoMap::AddExtension, info_map(), 155 BrowserThread::IO, FROM_HERE,
156 make_scoped_refptr(extension), 156 base::Bind(&InfoMap::AddExtension, info_map(),
157 base::Time::Now(), false, false), 157 base::RetainedRef(extension), base::Time::Now(), false, false),
158 callback); 158 callback);
159 } 159 }
160 160
161 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts( 161 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts(
162 const std::string& extension_id, 162 const std::string& extension_id,
163 const UnloadedExtensionInfo::Reason reason) { 163 const UnloadedExtensionInfo::Reason reason) {
164 } 164 }
165 165
166 const OneShotEvent& ShellExtensionSystem::ready() const { 166 const OneShotEvent& ShellExtensionSystem::ready() const {
167 return ready_; 167 return ready_;
168 } 168 }
(...skipping 14 matching lines...) Expand all
183 } 183 }
184 184
185 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( 185 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts(
186 scoped_refptr<Extension> extension) { 186 scoped_refptr<Extension> extension) {
187 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); 187 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_);
188 registry->AddReady(extension); 188 registry->AddReady(extension);
189 registry->TriggerOnReady(extension.get()); 189 registry->TriggerOnReady(extension.get());
190 } 190 }
191 191
192 } // namespace extensions 192 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/bluetooth/bluetooth_event_router.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698