| OLD | NEW |
| 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 #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 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Writes the info to the "ap" value in a given registry key. | 30 // Writes the info to the "ap" value in a given registry key. |
| 31 // Returns false if the value could not be written to the registry. | 31 // Returns false if the value could not be written to the registry. |
| 32 bool Write(base::win::RegKey* key) const; | 32 bool Write(base::win::RegKey* key) const; |
| 33 | 33 |
| 34 const base::string16& value() const { return value_; } | 34 const base::string16& value() const { return value_; } |
| 35 void set_value(const base::string16& value) { value_ = value; } | 35 void set_value(const base::string16& value) { value_ = value; } |
| 36 bool Equals(const ChannelInfo& other) const { | 36 bool Equals(const ChannelInfo& other) const { |
| 37 return value_ == other.value_; | 37 return value_ == other.value_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 // Determines the update channel for the value. Possible |channel_name| | |
| 41 // results are the empty string (stable channel), "beta", and "dev". Returns | |
| 42 // false (without modifying |channel_name|) if the channel could not be | |
| 43 // determined. | |
| 44 bool GetChannelName(base::string16* channel_name) const; | |
| 45 | |
| 46 // Returns true if the -chrome modifier is present in the value. | 40 // Returns true if the -chrome modifier is present in the value. |
| 47 bool IsChrome() const; | 41 bool IsChrome() const; |
| 48 | 42 |
| 49 // Adds or removes the -chrome modifier, returning true if the value is | 43 // Adds or removes the -chrome modifier, returning true if the value is |
| 50 // modified. | 44 // modified. |
| 51 bool SetChrome(bool value); | 45 bool SetChrome(bool value); |
| 52 | 46 |
| 53 // Returns true if the -chromeframe modifier is present in the value. | 47 // Returns true if the -chromeframe modifier is present in the value. |
| 54 bool IsChromeFrame() const; | 48 bool IsChromeFrame() const; |
| 55 | 49 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // becomes 2.0-dev. Returns true if the value is modified. | 106 // becomes 2.0-dev. Returns true if the value is modified. |
| 113 bool RemoveAllModifiersAndSuffixes(); | 107 bool RemoveAllModifiersAndSuffixes(); |
| 114 | 108 |
| 115 private: | 109 private: |
| 116 base::string16 value_; | 110 base::string16 value_; |
| 117 }; // class ChannelInfo | 111 }; // class ChannelInfo |
| 118 | 112 |
| 119 } // namespace installer | 113 } // namespace installer |
| 120 | 114 |
| 121 #endif // CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ | 115 #endif // CHROME_INSTALLER_UTIL_CHANNEL_INFO_H_ |
| OLD | NEW |