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

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

Issue 12282019: Disable "using base::FilePath" on Linux since it now compiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/create_reg_key_work_item.cc ('k') | chrome/installer/util/helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_util.h" 5 #include "chrome/installer/util/google_update_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 const int kEnvVariableUntrustedDataMaxLength = 4096; 36 const int kEnvVariableUntrustedDataMaxLength = 4096;
37 37
38 // Returns true if Google Update is present at the given level. 38 // Returns true if Google Update is present at the given level.
39 bool IsGoogleUpdatePresent(bool system_install) { 39 bool IsGoogleUpdatePresent(bool system_install) {
40 // Using the existence of version key in the registry to decide. 40 // Using the existence of version key in the registry to decide.
41 return GoogleUpdateSettings::GetGoogleUpdateVersion(system_install).IsValid(); 41 return GoogleUpdateSettings::GetGoogleUpdateVersion(system_install).IsValid();
42 } 42 }
43 43
44 // Returns GoogleUpdateSetup.exe's executable path at specified level. 44 // Returns GoogleUpdateSetup.exe's executable path at specified level.
45 // or an empty path if none is found. 45 // or an empty path if none is found.
46 FilePath GetGoogleUpdateSetupExe(bool system_install) { 46 base::FilePath GetGoogleUpdateSetupExe(bool system_install) {
47 const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 47 const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
48 RegKey update_key; 48 RegKey update_key;
49 49
50 if (update_key.Open(root_key, kRegPathGoogleUpdate, KEY_QUERY_VALUE) == 50 if (update_key.Open(root_key, kRegPathGoogleUpdate, KEY_QUERY_VALUE) ==
51 ERROR_SUCCESS) { 51 ERROR_SUCCESS) {
52 string16 path_str; 52 string16 path_str;
53 string16 version_str; 53 string16 version_str;
54 if ((update_key.ReadValue(kRegPathField, &path_str) == ERROR_SUCCESS) && 54 if ((update_key.ReadValue(kRegPathField, &path_str) == ERROR_SUCCESS) &&
55 (update_key.ReadValue(kRegGoogleUpdateVersion, &version_str) == 55 (update_key.ReadValue(kRegGoogleUpdateVersion, &version_str) ==
56 ERROR_SUCCESS)) { 56 ERROR_SUCCESS)) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 std::map<std::string, std::string>::const_iterator data_it( 214 std::map<std::string, std::string>::const_iterator data_it(
215 untrusted_data.find(key)); 215 untrusted_data.find(key));
216 if (data_it != untrusted_data.end()) 216 if (data_it != untrusted_data.end())
217 return data_it->second; 217 return data_it->second;
218 } 218 }
219 219
220 return std::string(); 220 return std::string();
221 } 221 }
222 222
223 } // namespace google_update 223 } // namespace google_update
OLDNEW
« no previous file with comments | « chrome/installer/util/create_reg_key_work_item.cc ('k') | chrome/installer/util/helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698