| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/extensions_service.h" | 5 #include "chrome/browser/extensions/extensions_service.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 31 #include "chrome/browser/extensions/external_registry_extension_provider_win.h" | 31 #include "chrome/browser/extensions/external_registry_extension_provider_win.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 // Helper class to collect the IDs of every extension listed in the prefs. | 36 // Helper class to collect the IDs of every extension listed in the prefs. |
| 37 class InstalledExtensionSet { | 37 class InstalledExtensionSet { |
| 38 public: | 38 public: |
| 39 InstalledExtensionSet(InstalledExtensions* installed) { | 39 explicit InstalledExtensionSet(InstalledExtensions* installed) { |
| 40 scoped_ptr<InstalledExtensions> cleanup(installed); | 40 scoped_ptr<InstalledExtensions> cleanup(installed); |
| 41 installed->VisitInstalledExtensions( | 41 installed->VisitInstalledExtensions( |
| 42 NewCallback(this, &InstalledExtensionSet::ExtensionVisited)); | 42 NewCallback(this, &InstalledExtensionSet::ExtensionVisited)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 const std::set<std::string>& extensions() { return extensions_; } | 45 const std::set<std::string>& extensions() { return extensions_; } |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 void ExtensionVisited( | 48 void ExtensionVisited( |
| 49 DictionaryValue* manifest, const std::string& id, | 49 DictionaryValue* manifest, const std::string& id, |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 linked_ptr<ExternalExtensionProvider>(test_provider); | 802 linked_ptr<ExternalExtensionProvider>(test_provider); |
| 803 } | 803 } |
| 804 | 804 |
| 805 void ExtensionsServiceBackend::OnExternalExtensionFound( | 805 void ExtensionsServiceBackend::OnExternalExtensionFound( |
| 806 const std::string& id, const Version* version, const FilePath& path, | 806 const std::string& id, const Version* version, const FilePath& path, |
| 807 Extension::Location location) { | 807 Extension::Location location) { |
| 808 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod(frontend_, | 808 frontend_loop_->PostTask(FROM_HERE, NewRunnableMethod(frontend_, |
| 809 &ExtensionsService::OnExternalExtensionFound, id, version->GetString(), | 809 &ExtensionsService::OnExternalExtensionFound, id, version->GetString(), |
| 810 path, location)); | 810 path, location)); |
| 811 } | 811 } |
| OLD | NEW |