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

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

Issue 10695012: Addressing remaining Breakpad integration issues: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback and rebased. Created 8 years, 5 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 | « remoting/host/plugin/daemon_controller_win.cc ('k') | no next file » | 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) 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/logging.h" 10 #include "base/logging.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 DWORD value = 0; 51 DWORD value = 0;
52 if (ReadUsageStatsValue(kOmahaClientStateMedium, &value) == ERROR_SUCCESS) { 52 if (ReadUsageStatsValue(kOmahaClientStateMedium, &value) == ERROR_SUCCESS) {
53 *allowed = value != 0; 53 *allowed = value != 0;
54 return true; 54 return true;
55 } 55 }
56 if (ReadUsageStatsValue(kOmahaClientState, &value) == ERROR_SUCCESS) { 56 if (ReadUsageStatsValue(kOmahaClientState, &value) == ERROR_SUCCESS) {
57 *allowed = value != 0; 57 *allowed = value != 0;
58 return true; 58 return true;
59 } 59 }
60 60
61 LOG_GETLASTERROR(ERROR) 61 // We do not log the error code here because the logging hasn't been
62 << "Failed to record the user's consent to crash dump reporting"; 62 // initialized yet.
63 return false; 63 return false;
64 } 64 }
65 65
66 bool IsUsageStatsAllowed() { 66 bool IsUsageStatsAllowed() {
67 bool allowed; 67 bool allowed;
68 bool set_by_policy; 68 bool set_by_policy;
69 return GetUsageStatsConsent(&allowed, &set_by_policy) && allowed; 69 return GetUsageStatsConsent(&allowed, &set_by_policy) && allowed;
70 } 70 }
71 71
72 bool SetUsageStatsConsent(bool allowed) { 72 bool SetUsageStatsConsent(bool allowed) {
(...skipping 10 matching lines...) Expand all
83 return true; 83 return true;
84 } 84 }
85 } 85 }
86 86
87 LOG_GETLASTERROR(ERROR) 87 LOG_GETLASTERROR(ERROR)
88 << "Failed to record the user's consent to crash dump reporting"; 88 << "Failed to record the user's consent to crash dump reporting";
89 return false; 89 return false;
90 } 90 }
91 91
92 } // namespace remoting 92 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/plugin/daemon_controller_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698