| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 const base::Closure& callback) { | 168 const base::Closure& callback) { |
| 169 BrowserThread::PostTaskAndReply( | 169 BrowserThread::PostTaskAndReply( |
| 170 BrowserThread::IO, FROM_HERE, | 170 BrowserThread::IO, FROM_HERE, |
| 171 base::Bind(&InfoMap::AddExtension, info_map(), | 171 base::Bind(&InfoMap::AddExtension, info_map(), |
| 172 base::RetainedRef(extension), base::Time::Now(), false, false), | 172 base::RetainedRef(extension), base::Time::Now(), false, false), |
| 173 callback); | 173 callback); |
| 174 } | 174 } |
| 175 | 175 |
| 176 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts( | 176 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts( |
| 177 const std::string& extension_id, | 177 const std::string& extension_id, |
| 178 const UnloadedExtensionInfo::Reason reason) { | 178 const UnloadedExtensionReason reason) {} |
| 179 } | |
| 180 | 179 |
| 181 const OneShotEvent& ShellExtensionSystem::ready() const { | 180 const OneShotEvent& ShellExtensionSystem::ready() const { |
| 182 return ready_; | 181 return ready_; |
| 183 } | 182 } |
| 184 | 183 |
| 185 ContentVerifier* ShellExtensionSystem::content_verifier() { | 184 ContentVerifier* ShellExtensionSystem::content_verifier() { |
| 186 return nullptr; | 185 return nullptr; |
| 187 } | 186 } |
| 188 | 187 |
| 189 std::unique_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions( | 188 std::unique_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions( |
| 190 const Extension* extension) { | 189 const Extension* extension) { |
| 191 return base::MakeUnique<ExtensionSet>(); | 190 return base::MakeUnique<ExtensionSet>(); |
| 192 } | 191 } |
| 193 | 192 |
| 194 void ShellExtensionSystem::InstallUpdate(const std::string& extension_id, | 193 void ShellExtensionSystem::InstallUpdate(const std::string& extension_id, |
| 195 const base::FilePath& temp_dir) { | 194 const base::FilePath& temp_dir) { |
| 196 NOTREACHED(); | 195 NOTREACHED(); |
| 197 base::DeleteFile(temp_dir, true /* recursive */); | 196 base::DeleteFile(temp_dir, true /* recursive */); |
| 198 } | 197 } |
| 199 | 198 |
| 200 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( | 199 void ShellExtensionSystem::OnExtensionRegisteredWithRequestContexts( |
| 201 scoped_refptr<Extension> extension) { | 200 scoped_refptr<Extension> extension) { |
| 202 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); | 201 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context_); |
| 203 registry->AddReady(extension); | 202 registry->AddReady(extension); |
| 204 registry->TriggerOnReady(extension.get()); | 203 registry->TriggerOnReady(extension.get()); |
| 205 } | 204 } |
| 206 | 205 |
| 207 } // namespace extensions | 206 } // namespace extensions |
| OLD | NEW |