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 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 void InitializeFromPreferences(const MasterPreferences& prefs); | 46 void InitializeFromPreferences(const MasterPreferences& prefs); |
47 | 47 |
48 void InitializeFromUninstallCommand( | 48 void InitializeFromUninstallCommand( |
49 const base::CommandLine& uninstall_command); | 49 const base::CommandLine& uninstall_command); |
50 | 50 |
51 BrowserDistribution* distribution() const { | 51 BrowserDistribution* distribution() const { |
52 return distribution_; | 52 return distribution_; |
53 } | 53 } |
54 | 54 |
55 bool is_type(BrowserDistribution::Type type) const { | 55 bool is_type(BrowserDistribution::Type type) const { |
56 return distribution_->GetType() == type; | 56 return distribution_->GetType() == type; |
robertshield
2017/01/10 14:49:30
Probably doesn't matter since you're a one-man cle
grt (UTC plus 2)
2017/01/10 19:54:42
The very next CL (https://codereview.chromium.org/
| |
57 } | 57 } |
58 | 58 |
59 bool is_chrome() const { | 59 bool is_chrome() const { |
60 return distribution_->GetType() == BrowserDistribution::CHROME_BROWSER; | 60 return distribution_->GetType() == BrowserDistribution::CHROME_BROWSER; |
61 } | 61 } |
62 | 62 |
63 bool is_chrome_binaries() const { | |
64 return distribution_->GetType() == BrowserDistribution::CHROME_BINARIES; | |
65 } | |
66 | |
67 bool HasOption(const std::wstring& option) const { | 63 bool HasOption(const std::wstring& option) const { |
68 return options_.find(option) != options_.end(); | 64 return options_.find(option) != options_.end(); |
69 } | 65 } |
70 | 66 |
71 // Returns true if the set of options is mutated by this operation. | 67 // Returns true if the set of options is mutated by this operation. |
72 bool SetOption(const std::wstring& option, bool set) { | 68 bool SetOption(const std::wstring& option, bool set) { |
73 if (set) | 69 if (set) |
74 return options_.insert(option).second; | 70 return options_.insert(option).second; |
75 else | 71 else |
76 return options_.erase(option) != 0; | 72 return options_.erase(option) != 0; |
(...skipping 10 matching lines...) Expand all Loading... | |
87 // The program part will be ignored. | 83 // The program part will be ignored. |
88 bool LaunchChromeAndWait(const base::FilePath& application_path, | 84 bool LaunchChromeAndWait(const base::FilePath& application_path, |
89 const base::CommandLine& options, | 85 const base::CommandLine& options, |
90 int32_t* exit_code) const; | 86 int32_t* exit_code) const; |
91 | 87 |
92 // Sets the boolean MSI marker for this installation if set is true or clears | 88 // Sets the boolean MSI marker for this installation if set is true or clears |
93 // it otherwise. The MSI marker is stored in the registry under the | 89 // it otherwise. The MSI marker is stored in the registry under the |
94 // ClientState key. | 90 // ClientState key. |
95 bool SetMsiMarker(bool system_install, bool set) const; | 91 bool SetMsiMarker(bool system_install, bool set) const; |
96 | 92 |
97 // Returns true if setup should create an entry in the Add/Remove list | |
98 // of installed applications. | |
99 bool ShouldCreateUninstallEntry() const; | |
100 | |
101 // See ProductOperations::AddKeyFiles. | 93 // See ProductOperations::AddKeyFiles. |
102 void AddKeyFiles(std::vector<base::FilePath>* key_files) const; | 94 void AddKeyFiles(std::vector<base::FilePath>* key_files) const; |
103 | 95 |
104 // See ProductOperations::AppendProductFlags. | 96 // See ProductOperations::AppendProductFlags. |
105 void AppendProductFlags(base::CommandLine* command_line) const; | 97 void AppendProductFlags(base::CommandLine* command_line) const; |
106 | 98 |
107 // See ProductOperations::AppendRenameFlags. | 99 // See ProductOperations::AppendRenameFlags. |
108 void AppendRenameFlags(base::CommandLine* command_line) const; | 100 void AppendRenameFlags(base::CommandLine* command_line) const; |
109 | 101 |
110 // See Productoperations::SetChannelFlags. | 102 // See Productoperations::SetChannelFlags. |
(...skipping 17 matching lines...) Expand all Loading... | |
128 std::unique_ptr<ProductOperations> operations_; | 120 std::unique_ptr<ProductOperations> operations_; |
129 std::set<std::wstring> options_; | 121 std::set<std::wstring> options_; |
130 | 122 |
131 private: | 123 private: |
132 DISALLOW_COPY_AND_ASSIGN(Product); | 124 DISALLOW_COPY_AND_ASSIGN(Product); |
133 }; | 125 }; |
134 | 126 |
135 } // namespace installer | 127 } // namespace installer |
136 | 128 |
137 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_ | 129 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_ |
OLD | NEW |