OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
6 #define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 6 #define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Overwrites the current value of the referral with an empty string. Returns | 77 // Overwrites the current value of the referral with an empty string. Returns |
78 // true if this operation succeeded. | 78 // true if this operation succeeded. |
79 static bool ClearReferral(); | 79 static bool ClearReferral(); |
80 | 80 |
81 // Return a human readable modifier for the version string, e.g. | 81 // Return a human readable modifier for the version string, e.g. |
82 // the channel (dev, beta, stable). Returns true if this operation succeeded, | 82 // the channel (dev, beta, stable). Returns true if this operation succeeded, |
83 // on success, channel contains one of "", "unknown", "dev" or "beta". | 83 // on success, channel contains one of "", "unknown", "dev" or "beta". |
84 static bool GetChromeChannel(bool system_install, std::wstring* channel); | 84 static bool GetChromeChannel(bool system_install, std::wstring* channel); |
85 | 85 |
86 static void UpdateDiffInstallStatus(bool system_install, | |
87 bool incremental_install, | |
88 int install_return_code, | |
89 const std::wstring& product_guid); | |
90 | |
91 // This method generates the new value for Google Update "ap" key for Chrome | |
92 // based on whether we are doing incremental install (or not) and whether | |
93 // the install succeeded. | |
94 // - If install worked, remove the magic string (if present). | |
95 // - If incremental installer failed, append a magic string (if | |
96 // not present already). | |
97 // - If full installer failed, still remove this magic | |
98 // string (if it is present already). | |
99 // | |
100 // diff_install: tells whether this is incremental install or not. | |
101 // install_return_code: if 0, means installation was successful. | |
102 // value: current value of Google Update "ap" key. | |
103 static std::wstring GetNewGoogleUpdateApKey(bool diff_install, | |
104 int install_return_code, | |
105 const std::wstring& value); | |
106 | |
107 private: | 86 private: |
108 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); | 87 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); |
109 }; | 88 }; |
110 | 89 |
111 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 90 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
OLD | NEW |