| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Utility functions for CEEE. | 5 // Utility functions for CEEE. |
| 6 | 6 |
| 7 #include "ceee/ie/common/ceee_util.h" | 7 #include "ceee/ie/common/ceee_util.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/win/registry.h" | 11 #include "base/win/registry.h" |
| 12 | 12 |
| 13 #include "toolband.h" // NOLINT | 13 #include "toolband.h" // NOLINT |
| 14 | 14 |
| 15 namespace ceee_util { | 15 namespace ceee_util { |
| 16 | 16 |
| 17 bool IsIeCeeeRegistered() { | 17 bool IsIeCeeeRegistered() { |
| 18 wchar_t clsid[40] = { 0 }; | 18 wchar_t clsid[40] = { 0 }; |
| 19 int num_chars = ::StringFromGUID2(CLSID_ToolBand, clsid, arraysize(clsid)); | 19 int num_chars = ::StringFromGUID2(CLSID_ToolBand, clsid, arraysize(clsid)); |
| 20 CHECK(num_chars > 0); | 20 CHECK(num_chars > 0); |
| 21 | 21 |
| 22 std::wstring path(L"CLSID\\"); | 22 std::wstring path(L"CLSID\\"); |
| 23 path += clsid; | 23 path += clsid; |
| 24 | 24 |
| 25 base::win::RegKey key; | 25 base::win::RegKey key; |
| 26 return key.Open(HKEY_CLASSES_ROOT, path.c_str(), KEY_QUERY_VALUE); | 26 return key.Open(HKEY_CLASSES_ROOT, path.c_str(), KEY_QUERY_VALUE); |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace ceee_util | 29 } // namespace ceee_util |
| OLD | NEW |