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

Side by Side Diff: chrome/installer/util/google_update_settings.cc

Issue 1281313003: base: Remove using:: declaration from version.h header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 5 years, 4 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
OLDNEW
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"
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 RegKey update_key; 791 RegKey update_key;
792 792
793 if (update_key.Open(root_key, google_update::kRegPathGoogleUpdate, 793 if (update_key.Open(root_key, google_update::kRegPathGoogleUpdate,
794 KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS) { 794 KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS) {
795 update_key.ReadValue(google_update::kRegUninstallCmdLine, &cmd_line); 795 update_key.ReadValue(google_update::kRegUninstallCmdLine, &cmd_line);
796 } 796 }
797 797
798 return cmd_line; 798 return cmd_line;
799 } 799 }
800 800
801 Version GoogleUpdateSettings::GetGoogleUpdateVersion(bool system_install) { 801 base::Version GoogleUpdateSettings::GetGoogleUpdateVersion(
802 bool system_install) {
802 const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 803 const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
803 base::string16 version; 804 base::string16 version;
804 RegKey key; 805 RegKey key;
805 806
806 if (key.Open(root_key, 807 if (key.Open(root_key,
807 google_update::kRegPathGoogleUpdate, 808 google_update::kRegPathGoogleUpdate,
808 KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS && 809 KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS &&
809 key.ReadValue(google_update::kRegGoogleUpdateVersion, &version) == 810 key.ReadValue(google_update::kRegGoogleUpdateVersion, &version) ==
810 ERROR_SUCCESS) { 811 ERROR_SUCCESS) {
811 return Version(base::UTF16ToUTF8(version)); 812 return base::Version(base::UTF16ToUTF8(version));
812 } 813 }
813 814
814 return Version(); 815 return base::Version();
815 } 816 }
816 817
817 base::Time GoogleUpdateSettings::GetGoogleUpdateLastStartedAU( 818 base::Time GoogleUpdateSettings::GetGoogleUpdateLastStartedAU(
818 bool system_install) { 819 bool system_install) {
819 const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 820 const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
820 RegKey update_key; 821 RegKey update_key;
821 822
822 if (update_key.Open(root_key, 823 if (update_key.Open(root_key,
823 google_update::kRegPathGoogleUpdate, 824 google_update::kRegPathGoogleUpdate,
824 KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS) { 825 KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 } 970 }
970 971
971 // If the key or value was not present, return the empty string. 972 // If the key or value was not present, return the empty string.
972 if (result == ERROR_FILE_NOT_FOUND || result == ERROR_PATH_NOT_FOUND) { 973 if (result == ERROR_FILE_NOT_FOUND || result == ERROR_PATH_NOT_FOUND) {
973 experiment_labels->clear(); 974 experiment_labels->clear();
974 return true; 975 return true;
975 } 976 }
976 977
977 return result == ERROR_SUCCESS; 978 return result == ERROR_SUCCESS;
978 } 979 }
OLDNEW
« no previous file with comments | « chrome/installer/util/google_update_settings.h ('k') | chrome/installer/util/google_update_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698