| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 std::wstring GoogleChromeDistribution::GetDistributionData(HKEY root_key) { | 441 std::wstring GoogleChromeDistribution::GetDistributionData(HKEY root_key) { |
| 442 std::wstring sub_key(google_update::kRegPathClientState); | 442 std::wstring sub_key(google_update::kRegPathClientState); |
| 443 sub_key.append(L"\\"); | 443 sub_key.append(L"\\"); |
| 444 sub_key.append(product_guid()); | 444 sub_key.append(product_guid()); |
| 445 | 445 |
| 446 base::win::RegKey client_state_key(root_key, sub_key.c_str(), KEY_READ); | 446 base::win::RegKey client_state_key(root_key, sub_key.c_str(), KEY_READ); |
| 447 std::wstring result; | 447 std::wstring result; |
| 448 std::wstring brand_value; | 448 std::wstring brand_value; |
| 449 if (client_state_key.ReadValue(google_update::kRegRLZBrandField, | 449 if (client_state_key.ReadValue(google_update::kRegRLZBrandField, |
| 450 &brand_value)) { | 450 &brand_value) == ERROR_SUCCESS) { |
| 451 result = google_update::kRegRLZBrandField; | 451 result = google_update::kRegRLZBrandField; |
| 452 result.append(L"="); | 452 result.append(L"="); |
| 453 result.append(brand_value); | 453 result.append(brand_value); |
| 454 result.append(L"&"); | 454 result.append(L"&"); |
| 455 } | 455 } |
| 456 | 456 |
| 457 std::wstring client_value; | 457 std::wstring client_value; |
| 458 if (client_state_key.ReadValue(google_update::kRegClientField, | 458 if (client_state_key.ReadValue(google_update::kRegClientField, |
| 459 &client_value)) { | 459 &client_value) == ERROR_SUCCESS) { |
| 460 result.append(google_update::kRegClientField); | 460 result.append(google_update::kRegClientField); |
| 461 result.append(L"="); | 461 result.append(L"="); |
| 462 result.append(client_value); | 462 result.append(client_value); |
| 463 result.append(L"&"); | 463 result.append(L"&"); |
| 464 } | 464 } |
| 465 | 465 |
| 466 std::wstring ap_value; | 466 std::wstring ap_value; |
| 467 // If we fail to read the ap key, send up "&ap=" anyway to indicate | 467 // If we fail to read the ap key, send up "&ap=" anyway to indicate |
| 468 // that this was probably a stable channel release. | 468 // that this was probably a stable channel release. |
| 469 client_state_key.ReadValue(google_update::kRegApField, &ap_value); | 469 client_state_key.ReadValue(google_update::kRegApField, &ap_value); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 // running. | 679 // running. |
| 680 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( | 680 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( |
| 681 installer::switches::kSystemLevelToast); | 681 installer::switches::kSystemLevelToast); |
| 682 | 682 |
| 683 std::wstring cmd(InstallUtil::GetChromeUninstallCmd( | 683 std::wstring cmd(InstallUtil::GetChromeUninstallCmd( |
| 684 system_level_toast, this)); | 684 system_level_toast, this)); |
| 685 | 685 |
| 686 base::LaunchApp(cmd, false, false, NULL); | 686 base::LaunchApp(cmd, false, false, NULL); |
| 687 } | 687 } |
| 688 #endif | 688 #endif |
| OLD | NEW |