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

Side by Side Diff: chrome/tools/disable_outdated_build_detector/google_update_integration.h

Issue 2255783003: Make the outdated build detector disabler load and run on XP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: suppress wstring warnings Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_TOOLS_DISABLE_OUTDATED_BUILD_DETECTOR_GOOGLE_UPDATE_INTEGRATION_H _ 5 #ifndef CHROME_TOOLS_DISABLE_OUTDATED_BUILD_DETECTOR_GOOGLE_UPDATE_INTEGRATION_H _
6 #define CHROME_TOOLS_DISABLE_OUTDATED_BUILD_DETECTOR_GOOGLE_UPDATE_INTEGRATION_H _ 6 #define CHROME_TOOLS_DISABLE_OUTDATED_BUILD_DETECTOR_GOOGLE_UPDATE_INTEGRATION_H _
7 7
8 #include "base/strings/string16.h" 8 #include <windows.h>
9 #include <stdint.h>
10
11 #include <string>
12
9 #include "chrome/tools/disable_outdated_build_detector/constants.h" 13 #include "chrome/tools/disable_outdated_build_detector/constants.h"
10 14
11 namespace base {
12 namespace win {
13 class RegKey;
14 }
15 }
16
17 // A structure containing the values that comprise the Google Update installer 15 // A structure containing the values that comprise the Google Update installer
18 // result API. 16 // result API.
19 struct ResultInfo { 17 struct ResultInfo {
20 InstallerResult installer_result; 18 InstallerResult installer_result;
21 ExitCode installer_error; 19 ExitCode installer_error;
22 uint32_t installer_extra_code1; 20 uint32_t installer_extra_code1;
23 }; 21 };
24 22
25 // An identifier of an app's registration with Google Update. 23 // An identifier of an app's registration with Google Update.
26 enum class App { 24 enum class App {
27 CHROME_BROWSER, 25 CHROME_BROWSER,
28 CHROME_BINARIES, 26 CHROME_BINARIES,
29 }; 27 };
30 28
31 // Opens the Google Update ClientState key in the registry for the app 29 // Opens the Google Update ClientState key in the registry for the app
32 // identified by |app| at |system_level|. Returns ERROR_SUCCESS or another 30 // identified by |app| at |system_level|. Returns ERROR_SUCCESS or another
33 // Windows error value. 31 // Windows error value. On success, the caller is responsible for calling
34 uint32_t OpenClientStateKey(bool system_level, App app, base::win::RegKey* key); 32 // RegCloseKey.
33 uint32_t OpenClientStateKey(bool system_level, App app, HKEY* key);
35 34
36 // Writes the data in |result_info| into Chrome's ClientState key. 35 // Writes the data in |result_info| into Chrome's ClientState key.
37 void WriteResultInfo(bool system_level, const ResultInfo& result_info); 36 void WriteResultInfo(bool system_level, const ResultInfo& result_info);
38 37
39 // Returns |true| if |brand| represents an organic brand code. 38 // Returns |true| if |brand| represents an organic brand code.
40 bool IsOrganic(const base::string16& brand); 39 // presubmit: allow wstring
40 bool IsOrganic(const std::wstring& brand);
41 41
42 #endif // CHROME_TOOLS_DISABLE_OUTDATED_BUILD_DETECTOR_GOOGLE_UPDATE_INTEGRATIO N_H_ 42 #endif // CHROME_TOOLS_DISABLE_OUTDATED_BUILD_DETECTOR_GOOGLE_UPDATE_INTEGRATIO N_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698