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 #include "chrome/installer/util/product.h" | 5 #include "chrome/installer/util/product.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/process/launch.h" | 11 #include "base/process/launch.h" |
12 #include "base/win/registry.h" | 12 #include "base/win/registry.h" |
13 #include "chrome/installer/util/chrome_app_host_operations.h" | |
14 #include "chrome/installer/util/chrome_binaries_operations.h" | 13 #include "chrome/installer/util/chrome_binaries_operations.h" |
15 #include "chrome/installer/util/chrome_browser_operations.h" | 14 #include "chrome/installer/util/chrome_browser_operations.h" |
16 #include "chrome/installer/util/chrome_browser_sxs_operations.h" | 15 #include "chrome/installer/util/chrome_browser_sxs_operations.h" |
17 #include "chrome/installer/util/chrome_frame_operations.h" | 16 #include "chrome/installer/util/chrome_frame_operations.h" |
18 #include "chrome/installer/util/google_update_constants.h" | 17 #include "chrome/installer/util/google_update_constants.h" |
19 #include "chrome/installer/util/helper.h" | 18 #include "chrome/installer/util/helper.h" |
20 #include "chrome/installer/util/install_util.h" | 19 #include "chrome/installer/util/install_util.h" |
21 #include "chrome/installer/util/master_preferences.h" | 20 #include "chrome/installer/util/master_preferences.h" |
22 #include "chrome/installer/util/master_preferences_constants.h" | 21 #include "chrome/installer/util/master_preferences_constants.h" |
23 #include "chrome/installer/util/product_operations.h" | 22 #include "chrome/installer/util/product_operations.h" |
24 | 23 |
25 using base::win::RegKey; | 24 using base::win::RegKey; |
26 using installer::MasterPreferences; | 25 using installer::MasterPreferences; |
27 | 26 |
28 namespace installer { | 27 namespace installer { |
29 | 28 |
30 Product::Product(BrowserDistribution* distribution) | 29 Product::Product(BrowserDistribution* distribution) |
31 : distribution_(distribution) { | 30 : distribution_(distribution) { |
32 switch (distribution->GetType()) { | 31 switch (distribution->GetType()) { |
33 case BrowserDistribution::CHROME_BROWSER: | 32 case BrowserDistribution::CHROME_BROWSER: |
34 operations_.reset(InstallUtil::IsChromeSxSProcess() ? | 33 operations_.reset(InstallUtil::IsChromeSxSProcess() ? |
35 new ChromeBrowserSxSOperations() : | 34 new ChromeBrowserSxSOperations() : |
36 new ChromeBrowserOperations()); | 35 new ChromeBrowserOperations()); |
37 break; | 36 break; |
38 case BrowserDistribution::CHROME_FRAME: | 37 case BrowserDistribution::CHROME_FRAME: |
39 operations_.reset(new ChromeFrameOperations()); | 38 operations_.reset(new ChromeFrameOperations()); |
40 break; | 39 break; |
41 case BrowserDistribution::CHROME_APP_HOST: | |
42 operations_.reset(new ChromeAppHostOperations()); | |
43 break; | |
44 case BrowserDistribution::CHROME_BINARIES: | 40 case BrowserDistribution::CHROME_BINARIES: |
45 operations_.reset(new ChromeBinariesOperations()); | 41 operations_.reset(new ChromeBinariesOperations()); |
46 break; | 42 break; |
47 default: | 43 default: |
48 NOTREACHED() << "Unsupported BrowserDistribution::Type: " | 44 NOTREACHED() << "Unsupported BrowserDistribution::Type: " |
49 << distribution->GetType(); | 45 << distribution->GetType(); |
50 } | 46 } |
51 } | 47 } |
52 | 48 |
53 Product::~Product() { | 49 Product::~Product() { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 if (distribution_->HasUserExperiments()) { | 164 if (distribution_->HasUserExperiments()) { |
169 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " | 165 VLOG(1) << "LaunchUserExperiment status: " << status << " product: " |
170 << distribution_->GetDisplayName() | 166 << distribution_->GetDisplayName() |
171 << " system_level: " << system_level; | 167 << " system_level: " << system_level; |
172 operations_->LaunchUserExperiment( | 168 operations_->LaunchUserExperiment( |
173 setup_path, options_, status, system_level); | 169 setup_path, options_, status, system_level); |
174 } | 170 } |
175 } | 171 } |
176 | 172 |
177 } // namespace installer | 173 } // namespace installer |
OLD | NEW |