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_PRODUCT_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_PRODUCT_H_ |
6 #define CHROME_INSTALLER_UTIL_PRODUCT_H_ | 6 #define CHROME_INSTALLER_UTIL_PRODUCT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 bool is_chrome() const { | 52 bool is_chrome() const { |
53 return distribution_->GetType() == BrowserDistribution::CHROME_BROWSER; | 53 return distribution_->GetType() == BrowserDistribution::CHROME_BROWSER; |
54 } | 54 } |
55 | 55 |
56 bool is_chrome_frame() const { | 56 bool is_chrome_frame() const { |
57 return distribution_->GetType() == BrowserDistribution::CHROME_FRAME; | 57 return distribution_->GetType() == BrowserDistribution::CHROME_FRAME; |
58 } | 58 } |
59 | 59 |
| 60 bool is_chrome_app_host() const { |
| 61 return distribution_->GetType() == BrowserDistribution::CHROME_APP_HOST; |
| 62 } |
| 63 |
| 64 bool is_chrome_binaries() const { |
| 65 return distribution_->GetType() == BrowserDistribution::CHROME_BINARIES; |
| 66 } |
| 67 |
60 bool HasOption(const std::wstring& option) const { | 68 bool HasOption(const std::wstring& option) const { |
61 return options_.find(option) != options_.end(); | 69 return options_.find(option) != options_.end(); |
62 } | 70 } |
63 | 71 |
64 // Returns true if the set of options is mutated by this operation. | 72 // Returns true if the set of options is mutated by this operation. |
65 bool SetOption(const std::wstring& option, bool set) { | 73 bool SetOption(const std::wstring& option, bool set) { |
66 if (set) | 74 if (set) |
67 return options_.insert(option).second; | 75 return options_.insert(option).second; |
68 else | 76 else |
69 return options_.erase(option) != 0; | 77 return options_.erase(option) != 0; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 scoped_ptr<ProductOperations> operations_; | 129 scoped_ptr<ProductOperations> operations_; |
122 std::set<std::wstring> options_; | 130 std::set<std::wstring> options_; |
123 | 131 |
124 private: | 132 private: |
125 DISALLOW_COPY_AND_ASSIGN(Product); | 133 DISALLOW_COPY_AND_ASSIGN(Product); |
126 }; | 134 }; |
127 | 135 |
128 } // namespace installer | 136 } // namespace installer |
129 | 137 |
130 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_ | 138 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_ |
OLD | NEW |