Index: ceee/ie/common/ceee_util.cc |
diff --git a/ceee/ie/common/ceee_util.cc b/ceee/ie/common/ceee_util.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c1ec20be8692f88464e281536d22587b8082e6ed |
--- /dev/null |
+++ b/ceee/ie/common/ceee_util.cc |
@@ -0,0 +1,29 @@ |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+// |
+// Utility functions for CEEE. |
+ |
+#include "ceee/ie/common/ceee_util.h" |
+ |
+#include "base/basictypes.h" |
+#include "base/logging.h" |
+#include "base/win/registry.h" |
+ |
+#include "toolband.h" // NOLINT |
+ |
+namespace ceee_util { |
+ |
+bool IsIeCeeeRegistered() { |
+ wchar_t clsid[40] = { 0 }; |
+ int num_chars = ::StringFromGUID2(CLSID_ToolBand, clsid, arraysize(clsid)); |
+ CHECK(num_chars > 0); |
+ |
+ std::wstring path(L"CLSID\\"); |
+ path += clsid; |
+ |
+ base::win::RegKey key; |
+ return key.Open(HKEY_CLASSES_ROOT, path.c_str(), KEY_READ); |
amit
2010/12/01 02:08:43
nit: KEY_QUERY_VALUE or SYNCHRONIZE? since you are
|
+} |
+ |
+} // namespace ceee_util |