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

Side by Side Diff: chrome/browser/google/google_update_settings_posix.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « chrome/browser/first_run/upgrade_util_win.cc ('k') | chrome/browser/google/google_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/installer/util/google_update_settings.h" 5 #include "chrome/installer/util/google_update_settings.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 bool GoogleUpdateSettings::SetMetricsId(const std::wstring& client_id) { 59 bool GoogleUpdateSettings::SetMetricsId(const std::wstring& client_id) {
60 // Make sure that user has consented to send crashes. 60 // Make sure that user has consented to send crashes.
61 base::FilePath consent_dir; 61 base::FilePath consent_dir;
62 PathService::Get(chrome::DIR_USER_DATA, &consent_dir); 62 PathService::Get(chrome::DIR_USER_DATA, &consent_dir);
63 if (!file_util::DirectoryExists(consent_dir) || 63 if (!file_util::DirectoryExists(consent_dir) ||
64 !GoogleUpdateSettings::GetCollectStatsConsent()) 64 !GoogleUpdateSettings::GetCollectStatsConsent())
65 return false; 65 return false;
66 66
67 // Since user has consented, write the metrics id to the file. 67 // Since user has consented, write the metrics id to the file.
68 google_update::posix_guid() = WideToASCII(client_id); 68 google_update::posix_guid() = base::WideToASCII(client_id);
69 return GoogleUpdateSettings::SetCollectStatsConsent(true); 69 return GoogleUpdateSettings::SetCollectStatsConsent(true);
70 } 70 }
71 71
72 // GetLastRunTime and SetLastRunTime are not implemented for posix. Their 72 // GetLastRunTime and SetLastRunTime are not implemented for posix. Their
73 // current return values signal failure which the caller is designed to 73 // current return values signal failure which the caller is designed to
74 // handle. 74 // handle.
75 75
76 // static 76 // static
77 int GoogleUpdateSettings::GetLastRunTime() { 77 int GoogleUpdateSettings::GetLastRunTime() {
78 return -1; 78 return -1;
79 } 79 }
80 80
81 // static 81 // static
82 bool GoogleUpdateSettings::SetLastRunTime() { 82 bool GoogleUpdateSettings::SetLastRunTime() {
83 return false; 83 return false;
84 } 84 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run/upgrade_util_win.cc ('k') | chrome/browser/google/google_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698