OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/unpacked_installer.h" | 5 #include "chrome/browser/extensions/unpacked_installer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 194 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
195 if (!service_weak_.get()) | 195 if (!service_weak_.get()) |
196 return; | 196 return; |
197 const ExtensionList* disabled_extensions = | 197 const ExtensionList* disabled_extensions = |
198 service_weak_->disabled_extensions(); | 198 service_weak_->disabled_extensions(); |
199 if (service_weak_->show_extensions_prompts() && | 199 if (service_weak_->show_extensions_prompts() && |
200 prompt_for_plugins_ && | 200 prompt_for_plugins_ && |
201 !extension->plugins().empty() && | 201 !extension->plugins().empty() && |
202 std::find(disabled_extensions->begin(), | 202 std::find(disabled_extensions->begin(), |
203 disabled_extensions->end(), | 203 disabled_extensions->end(), |
204 extension) != | 204 extension) == |
205 disabled_extensions->end()) { | 205 disabled_extensions->end()) { |
206 SimpleExtensionLoadPrompt* prompt = new SimpleExtensionLoadPrompt( | 206 SimpleExtensionLoadPrompt* prompt = new SimpleExtensionLoadPrompt( |
207 service_weak_->profile(), | 207 service_weak_->profile(), |
208 service_weak_, | 208 service_weak_, |
209 extension); | 209 extension); |
210 prompt->ShowPrompt(); | 210 prompt->ShowPrompt(); |
211 return; // continues in SimpleExtensionLoadPrompt::InstallUI* | 211 return; // continues in SimpleExtensionLoadPrompt::InstallUI* |
212 } | 212 } |
213 service_weak_->OnExtensionInstalled(extension, | 213 service_weak_->OnExtensionInstalled(extension, |
214 false, // Not from web store. | 214 false, // Not from web store. |
215 -1); | 215 -1); |
216 } | 216 } |
217 | 217 |
218 } // namespace extensions | 218 } // namespace extensions |
OLD | NEW |