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

Side by Side Diff: remoting/host/usage_stats_consent_win.cc

Issue 10579002: Cleanup: merging three different constants.h into a single header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/host/usage_stats_consent.h" 5 #include "remoting/host/usage_stats_consent.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
11 #include "base/win/registry.h" 11 #include "base/win/registry.h"
12 #include "remoting/host/constants.h" 12 #include "remoting/base/constants.h"
13 13
14 namespace { 14 namespace {
15 15
16 // The following strings are used to construct the registry key names where 16 // The following strings are used to construct the registry key names where
17 // we record whether the user has consented to crash dump collection. 17 // we record whether the user has consented to crash dump collection.
18 const wchar_t kOmahaClientStateKeyFormat[] = 18 const wchar_t kOmahaClientStateKeyFormat[] =
19 L"Software\\Google\\Update\\%ls\\%ls"; 19 L"Software\\Google\\Update\\%ls\\%ls";
20 const wchar_t kOmahaClientState[] = L"ClientState"; 20 const wchar_t kOmahaClientState[] = L"ClientState";
21 const wchar_t kOmahaClientStateMedium[] = L"ClientStateMedium"; 21 const wchar_t kOmahaClientStateMedium[] = L"ClientStateMedium";
22 const wchar_t kOmahaUsagestatsValue[] = L"usagestats"; 22 const wchar_t kOmahaUsagestatsValue[] = L"usagestats";
(...skipping 25 matching lines...) Expand all
48 } 48 }
49 if (ReadUsageStatsValue(kOmahaClientState, &value) == ERROR_SUCCESS) { 49 if (ReadUsageStatsValue(kOmahaClientState, &value) == ERROR_SUCCESS) {
50 return value != 0; 50 return value != 0;
51 } 51 }
52 52
53 // Do not collect anything unless the user has explicitly allowed it. 53 // Do not collect anything unless the user has explicitly allowed it.
54 return false; 54 return false;
55 } 55 }
56 56
57 } // namespace remoting 57 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698