| 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/external_registry_extension_provider_win.h" | 5 #include "chrome/browser/extensions/external_registry_extension_provider_win.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/registry.h" | 8 #include "base/registry.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" |
| 10 #include "base/version.h" | 11 #include "base/version.h" |
| 11 | 12 |
| 12 // The Registry hive where to look for external extensions. | 13 // The Registry hive where to look for external extensions. |
| 13 const HKEY kRegRoot = HKEY_LOCAL_MACHINE; | 14 const HKEY kRegRoot = HKEY_LOCAL_MACHINE; |
| 14 | 15 |
| 15 // The Registry subkey that contains information about external extensions. | 16 // The Registry subkey that contains information about external extensions. |
| 16 const char kRegistryExtensions[] = "Software\\Google\\Chrome\\Extensions"; | 17 const char kRegistryExtensions[] = "Software\\Google\\Chrome\\Extensions"; |
| 17 | 18 |
| 18 // Registry value of of that key that defines the path to the .crx file. | 19 // Registry value of of that key that defines the path to the .crx file. |
| 19 const wchar_t kRegistryExtensionPath[] = L"path"; | 20 const wchar_t kRegistryExtensionPath[] = L"path"; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 return NULL; | 81 return NULL; |
| 81 | 82 |
| 82 std::wstring extension_version; | 83 std::wstring extension_version; |
| 83 if (!key.ReadValue(kRegistryExtensionVersion, &extension_version)) | 84 if (!key.ReadValue(kRegistryExtensionVersion, &extension_version)) |
| 84 return NULL; | 85 return NULL; |
| 85 | 86 |
| 86 if (location) | 87 if (location) |
| 87 *location = Extension::EXTERNAL_REGISTRY; | 88 *location = Extension::EXTERNAL_REGISTRY; |
| 88 return Version::GetVersionFromString(extension_version); | 89 return Version::GetVersionFromString(extension_version); |
| 89 } | 90 } |
| OLD | NEW |