| OLD | NEW |
| 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 "chrome/installer/util/google_update_settings.h" | 5 #include "chrome/installer/util/google_update_settings.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/threading/thread_restrictions.h" | 18 #include "base/threading/thread_restrictions.h" |
| 19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "base/win/registry.h" | 20 #include "base/win/registry.h" |
| 21 #include "base/win/win_util.h" | 21 #include "base/win/win_util.h" |
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 23 #include "chrome/installer/util/app_registration_data.h" | 23 #include "chrome/installer/util/app_registration_data.h" |
| 24 #include "chrome/installer/util/browser_distribution.h" | 24 #include "chrome/installer/util/browser_distribution.h" |
| 25 #include "chrome/installer/util/channel_info.h" | 25 #include "chrome/installer/util/channel_info.h" |
| 26 #include "chrome/installer/util/google_update_constants.h" | 26 #include "chrome/installer/util/google_update_constants.h" |
| 27 #include "chrome/installer/util/google_update_experiment_util.h" | |
| 28 #include "chrome/installer/util/install_util.h" | 27 #include "chrome/installer/util/install_util.h" |
| 29 #include "chrome/installer/util/installation_state.h" | 28 #include "chrome/installer/util/installation_state.h" |
| 30 #include "chrome/installer/util/product.h" | 29 #include "chrome/installer/util/product.h" |
| 31 | 30 |
| 32 using base::win::RegKey; | 31 using base::win::RegKey; |
| 33 using installer::InstallationState; | 32 using installer::InstallationState; |
| 34 | 33 |
| 35 const wchar_t GoogleUpdateSettings::kPoliciesKey[] = | 34 const wchar_t GoogleUpdateSettings::kPoliciesKey[] = |
| 36 L"SOFTWARE\\Policies\\Google\\Update"; | 35 L"SOFTWARE\\Policies\\Google\\Update"; |
| 37 const wchar_t GoogleUpdateSettings::kUpdatePolicyValue[] = L"UpdateDefault"; | 36 const wchar_t GoogleUpdateSettings::kUpdatePolicyValue[] = L"UpdateDefault"; |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 } | 969 } |
| 971 | 970 |
| 972 // If the key or value was not present, return the empty string. | 971 // If the key or value was not present, return the empty string. |
| 973 if (result == ERROR_FILE_NOT_FOUND || result == ERROR_PATH_NOT_FOUND) { | 972 if (result == ERROR_FILE_NOT_FOUND || result == ERROR_PATH_NOT_FOUND) { |
| 974 experiment_labels->clear(); | 973 experiment_labels->clear(); |
| 975 return true; | 974 return true; |
| 976 } | 975 } |
| 977 | 976 |
| 978 return result == ERROR_SUCCESS; | 977 return result == ERROR_SUCCESS; |
| 979 } | 978 } |
| OLD | NEW |