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 // This file defines specific implementation of BrowserDistribution class for | 5 // This file defines specific implementation of BrowserDistribution class for |
6 // Google Chrome. | 6 // Google Chrome. |
7 | 7 |
8 #include "chrome/installer/util/google_chrome_distribution.h" | 8 #include "chrome/installer/util/google_chrome_distribution.h" |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
11 #include <msi.h> | 11 #include <msi.h> |
12 #include <shellapi.h> | 12 #include <shellapi.h> |
13 | 13 |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/win/registry.h" | 21 #include "base/win/registry.h" |
22 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
23 #include "chrome/common/chrome_icon_resources_win.h" | 23 #include "chrome/common/chrome_icon_resources_win.h" |
24 #include "chrome/common/chrome_paths_internal.h" | 24 #include "chrome/common/chrome_paths_internal.h" |
| 25 #include "chrome/install_static/install_util.h" |
25 #include "chrome/installer/util/app_registration_data.h" | 26 #include "chrome/installer/util/app_registration_data.h" |
26 #include "chrome/installer/util/channel_info.h" | 27 #include "chrome/installer/util/channel_info.h" |
27 #include "chrome/installer/util/google_update_constants.h" | 28 #include "chrome/installer/util/google_update_constants.h" |
28 #include "chrome/installer/util/google_update_settings.h" | 29 #include "chrome/installer/util/google_update_settings.h" |
29 #include "chrome/installer/util/helper.h" | 30 #include "chrome/installer/util/helper.h" |
30 #include "chrome/installer/util/install_util.h" | 31 #include "chrome/installer/util/install_util.h" |
31 #include "chrome/installer/util/installer_util_strings.h" | 32 #include "chrome/installer/util/installer_util_strings.h" |
32 #include "chrome/installer/util/l10n_string_util.h" | 33 #include "chrome/installer/util/l10n_string_util.h" |
33 #include "chrome/installer/util/uninstall_metrics.h" | 34 #include "chrome/installer/util/uninstall_metrics.h" |
34 #include "chrome/installer/util/updating_app_registration_data.h" | 35 #include "chrome/installer/util/updating_app_registration_data.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 base::string16 ap_value; | 244 base::string16 ap_value; |
244 // If we fail to read the ap key, send up "&ap=" anyway to indicate | 245 // If we fail to read the ap key, send up "&ap=" anyway to indicate |
245 // that this was probably a stable channel release. | 246 // that this was probably a stable channel release. |
246 client_state_key.ReadValue(google_update::kRegApField, &ap_value); | 247 client_state_key.ReadValue(google_update::kRegApField, &ap_value); |
247 result.append(google_update::kRegApField); | 248 result.append(google_update::kRegApField); |
248 result.append(L"="); | 249 result.append(L"="); |
249 result.append(ap_value); | 250 result.append(ap_value); |
250 | 251 |
251 // Crash client id. | 252 // Crash client id. |
252 base::FilePath crash_dir; | 253 base::FilePath crash_dir; |
253 if (chrome::GetDefaultCrashDumpLocation(&crash_dir)) { | 254 base::string16 crash_dump_location; |
| 255 if (install_static::GetDefaultCrashDumpLocation(&crash_dump_location)) { |
| 256 crash_dir = base::FilePath(crash_dump_location); |
254 crashpad::UUID client_id; | 257 crashpad::UUID client_id; |
255 std::unique_ptr<crashpad::CrashReportDatabase> database( | 258 std::unique_ptr<crashpad::CrashReportDatabase> database( |
256 crashpad::CrashReportDatabase::InitializeWithoutCreating(crash_dir)); | 259 crashpad::CrashReportDatabase::InitializeWithoutCreating(crash_dir)); |
257 if (database && database->GetSettings()->GetClientID(&client_id)) | 260 if (database && database->GetSettings()->GetClientID(&client_id)) |
258 result.append(L"&crash_client_id=").append(client_id.ToString16()); | 261 result.append(L"&crash_client_id=").append(client_id.ToString16()); |
259 } | 262 } |
260 | 263 |
261 return result; | 264 return result; |
262 } | 265 } |
263 | 266 |
(...skipping 26 matching lines...) Expand all Loading... |
290 GetAppGuid()); | 293 GetAppGuid()); |
291 } | 294 } |
292 | 295 |
293 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { | 296 bool GoogleChromeDistribution::ShouldSetExperimentLabels() { |
294 return true; | 297 return true; |
295 } | 298 } |
296 | 299 |
297 bool GoogleChromeDistribution::HasUserExperiments() { | 300 bool GoogleChromeDistribution::HasUserExperiments() { |
298 return true; | 301 return true; |
299 } | 302 } |
OLD | NEW |