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 #ifndef CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ |
6 #define CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ | 6 #define CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 namespace win { | 12 namespace win { |
13 class RegKey; | 13 class RegKey; |
14 } | 14 } |
15 } | 15 } |
16 | 16 |
17 namespace installer_util { | 17 namespace installer { |
18 | 18 |
19 // A helper class for parsing and modifying the Omaha additional parameter | 19 // A helper class for parsing and modifying the Omaha additional parameter |
20 // ("ap") client state value for a product. | 20 // ("ap") client state value for a product. |
21 class ChannelInfo { | 21 class ChannelInfo { |
22 public: | 22 public: |
23 | 23 |
24 // Initialize an instance from the "ap" value in a given registry key. | 24 // Initialize an instance from the "ap" value in a given registry key. |
25 // Returns false if the value could not be read from the registry. | 25 // Returns false if the value could not be read from the registry. |
26 bool Initialize(const base::win::RegKey& key); | 26 bool Initialize(const base::win::RegKey& key); |
27 | 27 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 private: | 62 private: |
63 static bool HasModifier(const wchar_t* modifier, | 63 static bool HasModifier(const wchar_t* modifier, |
64 const std::wstring& ap_value); | 64 const std::wstring& ap_value); |
65 static bool SetModifier(const wchar_t* modifier, bool set, | 65 static bool SetModifier(const wchar_t* modifier, bool set, |
66 std::wstring* ap_value); | 66 std::wstring* ap_value); |
67 | 67 |
68 std::wstring value_; | 68 std::wstring value_; |
69 }; // class ChannelInfo | 69 }; // class ChannelInfo |
70 | 70 |
71 } // namespace installer_util | 71 } // namespace installer |
72 | 72 |
73 #endif // CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ | 73 #endif // CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ |
OLD | NEW |