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

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

Issue 1281313003: base: Remove using:: declaration from version.h header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 5 years, 4 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
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_INSTALLATION_STATE_H_ 5 #ifndef CHROME_INSTALLER_UTIL_FAKE_INSTALLATION_STATE_H_
6 #define CHROME_INSTALLER_UTIL_FAKE_INSTALLATION_STATE_H_ 6 #define CHROME_INSTALLER_UTIL_FAKE_INSTALLATION_STATE_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/version.h" 9 #include "base/version.h"
10 #include "chrome/installer/util/fake_product_state.h" 10 #include "chrome/installer/util/fake_product_state.h"
11 #include "chrome/installer/util/helper.h" 11 #include "chrome/installer/util/helper.h"
12 #include "chrome/installer/util/installation_state.h" 12 #include "chrome/installer/util/installation_state.h"
13 #include "chrome/installer/util/util_constants.h" 13 #include "chrome/installer/util/util_constants.h"
14 14
15 namespace installer { 15 namespace installer {
16 16
17 // An InstallationState helper for use by unit tests. 17 // An InstallationState helper for use by unit tests.
18 class FakeInstallationState : public InstallationState { 18 class FakeInstallationState : public InstallationState {
19 public: 19 public:
20 // Takes ownership of |version|. 20 // Takes ownership of |version|.
21 void AddChrome(bool system_install, bool multi_install, Version* version) { 21 void AddChrome(bool system_install,
22 bool multi_install,
23 base::Version* version) {
22 FakeProductState chrome_state; 24 FakeProductState chrome_state;
23 chrome_state.set_version(version); 25 chrome_state.set_version(version);
24 chrome_state.set_multi_install(multi_install); 26 chrome_state.set_multi_install(multi_install);
25 base::FilePath setup_exe( 27 base::FilePath setup_exe(
26 GetChromeInstallPath(system_install, 28 GetChromeInstallPath(system_install,
27 BrowserDistribution::GetSpecificDistribution( 29 BrowserDistribution::GetSpecificDistribution(
28 BrowserDistribution::CHROME_BROWSER))); 30 BrowserDistribution::CHROME_BROWSER)));
29 setup_exe = setup_exe 31 setup_exe = setup_exe
30 .AppendASCII(version->GetString()) 32 .AppendASCII(version->GetString())
31 .Append(kInstallerDir) 33 .Append(kInstallerDir)
(...skipping 17 matching lines...) Expand all
49 51
50 protected: 52 protected:
51 ProductState* GetProducts(bool system_install) { 53 ProductState* GetProducts(bool system_install) {
52 return system_install ? system_products_ : user_products_; 54 return system_install ? system_products_ : user_products_;
53 } 55 }
54 }; 56 };
55 57
56 } // namespace installer 58 } // namespace installer
57 59
58 #endif // CHROME_INSTALLER_UTIL_FAKE_INSTALLATION_STATE_H_ 60 #endif // CHROME_INSTALLER_UTIL_FAKE_INSTALLATION_STATE_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/browser_distribution.cc ('k') | chrome/installer/util/fake_product_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698