| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 runtime_data_.reset( | 99 runtime_data_.reset( |
| 100 new RuntimeData(ExtensionRegistry::Get(browser_context_))); | 100 new RuntimeData(ExtensionRegistry::Get(browser_context_))); |
| 101 lazy_background_task_queue_.reset( | 101 lazy_background_task_queue_.reset( |
| 102 new LazyBackgroundTaskQueue(browser_context_)); | 102 new LazyBackgroundTaskQueue(browser_context_)); |
| 103 event_router_.reset( | 103 event_router_.reset( |
| 104 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); | 104 new EventRouter(browser_context_, ExtensionPrefs::Get(browser_context_))); |
| 105 quota_service_.reset(new QuotaService); | 105 quota_service_.reset(new QuotaService); |
| 106 } | 106 } |
| 107 | 107 |
| 108 ExtensionService* ShellExtensionSystem::extension_service() { | 108 ExtensionService* ShellExtensionSystem::extension_service() { |
| 109 return NULL; | 109 return nullptr; |
| 110 } | 110 } |
| 111 | 111 |
| 112 RuntimeData* ShellExtensionSystem::runtime_data() { | 112 RuntimeData* ShellExtensionSystem::runtime_data() { |
| 113 return runtime_data_.get(); | 113 return runtime_data_.get(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 ManagementPolicy* ShellExtensionSystem::management_policy() { | 116 ManagementPolicy* ShellExtensionSystem::management_policy() { |
| 117 return NULL; | 117 return nullptr; |
| 118 } | 118 } |
| 119 | 119 |
| 120 SharedUserScriptMaster* ShellExtensionSystem::shared_user_script_master() { | 120 SharedUserScriptMaster* ShellExtensionSystem::shared_user_script_master() { |
| 121 return NULL; | 121 return nullptr; |
| 122 } |
| 123 |
| 124 DeclarativeUserScriptManager* |
| 125 ShellExtensionSystem::declarative_user_script_manager() { |
| 126 return nullptr; |
| 122 } | 127 } |
| 123 | 128 |
| 124 StateStore* ShellExtensionSystem::state_store() { | 129 StateStore* ShellExtensionSystem::state_store() { |
| 125 return NULL; | 130 return nullptr; |
| 126 } | 131 } |
| 127 | 132 |
| 128 StateStore* ShellExtensionSystem::rules_store() { | 133 StateStore* ShellExtensionSystem::rules_store() { |
| 129 return NULL; | 134 return nullptr; |
| 130 } | 135 } |
| 131 | 136 |
| 132 InfoMap* ShellExtensionSystem::info_map() { | 137 InfoMap* ShellExtensionSystem::info_map() { |
| 133 if (!info_map_.get()) | 138 if (!info_map_.get()) |
| 134 info_map_ = new InfoMap; | 139 info_map_ = new InfoMap; |
| 135 return info_map_.get(); | 140 return info_map_.get(); |
| 136 } | 141 } |
| 137 | 142 |
| 138 LazyBackgroundTaskQueue* ShellExtensionSystem::lazy_background_task_queue() { | 143 LazyBackgroundTaskQueue* ShellExtensionSystem::lazy_background_task_queue() { |
| 139 return lazy_background_task_queue_.get(); | 144 return lazy_background_task_queue_.get(); |
| 140 } | 145 } |
| 141 | 146 |
| 142 EventRouter* ShellExtensionSystem::event_router() { | 147 EventRouter* ShellExtensionSystem::event_router() { |
| 143 return event_router_.get(); | 148 return event_router_.get(); |
| 144 } | 149 } |
| 145 | 150 |
| 146 ErrorConsole* ShellExtensionSystem::error_console() { | 151 ErrorConsole* ShellExtensionSystem::error_console() { |
| 147 return NULL; | 152 return nullptr; |
| 148 } | 153 } |
| 149 | 154 |
| 150 InstallVerifier* ShellExtensionSystem::install_verifier() { | 155 InstallVerifier* ShellExtensionSystem::install_verifier() { |
| 151 return NULL; | 156 return nullptr; |
| 152 } | 157 } |
| 153 | 158 |
| 154 QuotaService* ShellExtensionSystem::quota_service() { | 159 QuotaService* ShellExtensionSystem::quota_service() { |
| 155 return quota_service_.get(); | 160 return quota_service_.get(); |
| 156 } | 161 } |
| 157 | 162 |
| 158 void ShellExtensionSystem::RegisterExtensionWithRequestContexts( | 163 void ShellExtensionSystem::RegisterExtensionWithRequestContexts( |
| 159 const Extension* extension) { | 164 const Extension* extension) { |
| 160 BrowserThread::PostTask(BrowserThread::IO, | 165 BrowserThread::PostTask(BrowserThread::IO, |
| 161 FROM_HERE, | 166 FROM_HERE, |
| 162 base::Bind(&InfoMap::AddExtension, | 167 base::Bind(&InfoMap::AddExtension, |
| 163 info_map(), | 168 info_map(), |
| 164 make_scoped_refptr(extension), | 169 make_scoped_refptr(extension), |
| 165 base::Time::Now(), | 170 base::Time::Now(), |
| 166 false, | 171 false, |
| 167 false)); | 172 false)); |
| 168 } | 173 } |
| 169 | 174 |
| 170 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts( | 175 void ShellExtensionSystem::UnregisterExtensionWithRequestContexts( |
| 171 const std::string& extension_id, | 176 const std::string& extension_id, |
| 172 const UnloadedExtensionInfo::Reason reason) { | 177 const UnloadedExtensionInfo::Reason reason) { |
| 173 } | 178 } |
| 174 | 179 |
| 175 const OneShotEvent& ShellExtensionSystem::ready() const { | 180 const OneShotEvent& ShellExtensionSystem::ready() const { |
| 176 return ready_; | 181 return ready_; |
| 177 } | 182 } |
| 178 | 183 |
| 179 ContentVerifier* ShellExtensionSystem::content_verifier() { | 184 ContentVerifier* ShellExtensionSystem::content_verifier() { |
| 180 return NULL; | 185 return nullptr; |
| 181 } | 186 } |
| 182 | 187 |
| 183 scoped_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions( | 188 scoped_ptr<ExtensionSet> ShellExtensionSystem::GetDependentExtensions( |
| 184 const Extension* extension) { | 189 const Extension* extension) { |
| 185 return make_scoped_ptr(new ExtensionSet()); | 190 return make_scoped_ptr(new ExtensionSet()); |
| 186 } | 191 } |
| 187 | 192 |
| 188 DeclarativeUserScriptMaster* | |
| 189 ShellExtensionSystem::GetDeclarativeUserScriptMasterByExtension( | |
| 190 const ExtensionId& extension_id) { | |
| 191 return NULL; | |
| 192 } | |
| 193 | |
| 194 } // namespace extensions | 193 } // namespace extensions |
| OLD | NEW |