OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |