| OLD | NEW |
| 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/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 base::AutoLock lock(g_posix_client_id_lock.Get()); | 58 base::AutoLock lock(g_posix_client_id_lock.Get()); |
| 59 g_posix_client_id.Get().assign(tmp_guid); | 59 g_posix_client_id.Get().assign(tmp_guid); |
| 60 } | 60 } |
| 61 return consented; | 61 return consented; |
| 62 } | 62 } |
| 63 | 63 |
| 64 // static | 64 // static |
| 65 bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) { | 65 bool GoogleUpdateSettings::SetCollectStatsConsent(bool consented) { |
| 66 #if defined(OS_MACOSX) | 66 #if defined(OS_MACOSX) |
| 67 crash_reporter::SetUploadsEnabled(consented); | 67 crash_reporter::SetUploadConsent(consented); |
| 68 #endif | 68 #endif |
| 69 | 69 |
| 70 base::FilePath consent_dir; | 70 base::FilePath consent_dir; |
| 71 PathService::Get(chrome::DIR_USER_DATA, &consent_dir); | 71 PathService::Get(chrome::DIR_USER_DATA, &consent_dir); |
| 72 if (!base::DirectoryExists(consent_dir)) | 72 if (!base::DirectoryExists(consent_dir)) |
| 73 return false; | 73 return false; |
| 74 | 74 |
| 75 base::AutoLock lock(g_posix_client_id_lock.Get()); | 75 base::AutoLock lock(g_posix_client_id_lock.Get()); |
| 76 | 76 |
| 77 base::FilePath consent_file = consent_dir.AppendASCII(kConsentToSendStats); | 77 base::FilePath consent_file = consent_dir.AppendASCII(kConsentToSendStats); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 // static | 129 // static |
| 130 int GoogleUpdateSettings::GetLastRunTime() { | 130 int GoogleUpdateSettings::GetLastRunTime() { |
| 131 return -1; | 131 return -1; |
| 132 } | 132 } |
| 133 | 133 |
| 134 // static | 134 // static |
| 135 bool GoogleUpdateSettings::SetLastRunTime() { | 135 bool GoogleUpdateSettings::SetLastRunTime() { |
| 136 return false; | 136 return false; |
| 137 } | 137 } |
| OLD | NEW |