Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: ceee/ie/common/ceee_util.cc

Issue 6090006: Regkey functions return error code instead of bool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ceee/ie/common/ceee_module_util_unittest.cc ('k') | ceee/ie/common/ie_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ERROR_SUCCESS);
27 } 28 }
28 29
29 } // namespace ceee_util 30 } // namespace ceee_util
OLDNEW
« no previous file with comments | « ceee/ie/common/ceee_module_util_unittest.cc ('k') | ceee/ie/common/ie_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698