| 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 const Extension* extension = | 547 const Extension* extension = |
| 548 GetExtensionByIdInternal(id, true, true, false); | 548 GetExtensionByIdInternal(id, true, true, false); |
| 549 if (!is_pending_extension && !extension) { | 549 if (!is_pending_extension && !extension) { |
| 550 LOG(WARNING) << "Will not update extension " << id | 550 LOG(WARNING) << "Will not update extension " << id |
| 551 << " because it is not installed or pending"; | 551 << " because it is not installed or pending"; |
| 552 // Delete extension_path since we're not creating a CrxInstaller | 552 // Delete extension_path since we're not creating a CrxInstaller |
| 553 // that would do it for us. | 553 // that would do it for us. |
| 554 if (!BrowserThread::PostTask( | 554 if (!BrowserThread::PostTask( |
| 555 BrowserThread::FILE, FROM_HERE, | 555 BrowserThread::FILE, FROM_HERE, |
| 556 base::Bind( | 556 base::Bind( |
| 557 extension_file_util::DeleteFile, extension_path, false))) | 557 &extension_file_util::DeleteFile, extension_path, false))) |
| 558 NOTREACHED(); | 558 NOTREACHED(); |
| 559 | 559 |
| 560 return false; | 560 return false; |
| 561 } | 561 } |
| 562 | 562 |
| 563 // We want a silent install only for non-pending extensions and | 563 // We want a silent install only for non-pending extensions and |
| 564 // pending extensions that have install_silently set. | 564 // pending extensions that have install_silently set. |
| 565 ExtensionInstallUI* client = | 565 ExtensionInstallUI* client = |
| 566 (!is_pending_extension || pending_extension_info.install_silently()) ? | 566 (!is_pending_extension || pending_extension_info.install_silently()) ? |
| 567 NULL : new ExtensionInstallUI(profile_); | 567 NULL : new ExtensionInstallUI(profile_); |
| (...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 | 2511 |
| 2512 ExtensionService::NaClModuleInfoList::iterator | 2512 ExtensionService::NaClModuleInfoList::iterator |
| 2513 ExtensionService::FindNaClModule(const GURL& url) { | 2513 ExtensionService::FindNaClModule(const GURL& url) { |
| 2514 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2514 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2515 iter != nacl_module_list_.end(); ++iter) { | 2515 iter != nacl_module_list_.end(); ++iter) { |
| 2516 if (iter->url == url) | 2516 if (iter->url == url) |
| 2517 return iter; | 2517 return iter; |
| 2518 } | 2518 } |
| 2519 return nacl_module_list_.end(); | 2519 return nacl_module_list_.end(); |
| 2520 } | 2520 } |
| OLD | NEW |