Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: chrome/installer/util/fake_product_state.h

Issue 196413016: Move CommandLine to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/chrome_frame_operations.h ('k') | chrome/installer/util/install_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_FAKE_PRODUCT_STATE_H_ 5 #ifndef CHROME_INSTALLER_UTIL_FAKE_PRODUCT_STATE_H_
6 #define CHROME_INSTALLER_UTIL_FAKE_PRODUCT_STATE_H_ 6 #define CHROME_INSTALLER_UTIL_FAKE_PRODUCT_STATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include "chrome/installer/util/installation_state.h" 9 #include "chrome/installer/util/installation_state.h"
10 10
11 namespace installer { 11 namespace installer {
12 12
13 // A ProductState helper for use by unit tests. 13 // A ProductState helper for use by unit tests.
14 class FakeProductState : public ProductState { 14 class FakeProductState : public ProductState {
15 public: 15 public:
16 // Takes ownership of |version|. 16 // Takes ownership of |version|.
17 void set_version(Version* version) { version_.reset(version); } 17 void set_version(Version* version) { version_.reset(version); }
18 void set_multi_install(bool multi) { multi_install_ = multi; } 18 void set_multi_install(bool multi) { multi_install_ = multi; }
19 void set_brand(const std::wstring& brand) { brand_ = brand; } 19 void set_brand(const std::wstring& brand) { brand_ = brand; }
20 void set_usagestats(DWORD usagestats) { 20 void set_usagestats(DWORD usagestats) {
21 has_usagestats_ = true; 21 has_usagestats_ = true;
22 usagestats_ = usagestats; 22 usagestats_ = usagestats;
23 } 23 }
24 void clear_usagestats() { has_usagestats_ = false; } 24 void clear_usagestats() { has_usagestats_ = false; }
25 void SetUninstallProgram(const base::FilePath& setup_exe) { 25 void SetUninstallProgram(const base::FilePath& setup_exe) {
26 uninstall_command_ = CommandLine(setup_exe); 26 uninstall_command_ = base::CommandLine(setup_exe);
27 } 27 }
28 void AddUninstallSwitch(const std::string& option) { 28 void AddUninstallSwitch(const std::string& option) {
29 uninstall_command_.AppendSwitch(option); 29 uninstall_command_.AppendSwitch(option);
30 } 30 }
31 }; 31 };
32 32
33 } // namespace installer 33 } // namespace installer
34 34
35 #endif // CHROME_INSTALLER_UTIL_FAKE_PRODUCT_STATE_H_ 35 #endif // CHROME_INSTALLER_UTIL_FAKE_PRODUCT_STATE_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/chrome_frame_operations.h ('k') | chrome/installer/util/install_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698