| 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/setup/chrome_frame_quick_enable.h" | 5 #include "chrome/installer/setup/chrome_frame_quick_enable.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 10 #include "base/scoped_temp_dir.h" | |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/win/registry.h" | 12 #include "base/win/registry.h" |
| 13 #include "chrome/installer/setup/install_worker.h" | 13 #include "chrome/installer/setup/install_worker.h" |
| 14 #include "chrome/installer/util/google_update_constants.h" | 14 #include "chrome/installer/util/google_update_constants.h" |
| 15 #include "chrome/installer/util/google_update_settings.h" | 15 #include "chrome/installer/util/google_update_settings.h" |
| 16 #include "chrome/installer/util/install_util.h" | 16 #include "chrome/installer/util/install_util.h" |
| 17 #include "chrome/installer/util/installation_state.h" | 17 #include "chrome/installer/util/installation_state.h" |
| 18 #include "chrome/installer/util/installer_state.h" | 18 #include "chrome/installer/util/installer_state.h" |
| 19 #include "chrome/installer/util/product.h" | 19 #include "chrome/installer/util/product.h" |
| 20 #include "chrome/installer/util/work_item.h" | 20 #include "chrome/installer/util/work_item.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if (status == FIRST_INSTALL_SUCCESS) { | 74 if (status == FIRST_INSTALL_SUCCESS) { |
| 75 scoped_ptr<Product> multi_cf(new Product( | 75 scoped_ptr<Product> multi_cf(new Product( |
| 76 BrowserDistribution::GetSpecificDistribution( | 76 BrowserDistribution::GetSpecificDistribution( |
| 77 BrowserDistribution::CHROME_FRAME))); | 77 BrowserDistribution::CHROME_FRAME))); |
| 78 multi_cf->SetOption(installer::kOptionMultiInstall, true); | 78 multi_cf->SetOption(installer::kOptionMultiInstall, true); |
| 79 Product* cf = installer_state->AddProduct(&multi_cf); | 79 Product* cf = installer_state->AddProduct(&multi_cf); |
| 80 if (!cf) { | 80 if (!cf) { |
| 81 LOG(ERROR) << "AddProduct failed"; | 81 LOG(ERROR) << "AddProduct failed"; |
| 82 status = INSTALL_FAILED; | 82 status = INSTALL_FAILED; |
| 83 } else { | 83 } else { |
| 84 ScopedTempDir temp_path; | 84 base::ScopedTempDir temp_path; |
| 85 if (!temp_path.CreateUniqueTempDir()) { | 85 if (!temp_path.CreateUniqueTempDir()) { |
| 86 PLOG(ERROR) << "Failed to create Temp directory"; | 86 PLOG(ERROR) << "Failed to create Temp directory"; |
| 87 return INSTALL_FAILED; | 87 return INSTALL_FAILED; |
| 88 } | 88 } |
| 89 scoped_ptr<WorkItemList> item_list(WorkItem::CreateWorkItemList()); | 89 scoped_ptr<WorkItemList> item_list(WorkItem::CreateWorkItemList()); |
| 90 const ProductState* chrome_state = | 90 const ProductState* chrome_state = |
| 91 machine_state.GetProductState(installer_state->system_install(), | 91 machine_state.GetProductState(installer_state->system_install(), |
| 92 BrowserDistribution::CHROME_BROWSER); | 92 BrowserDistribution::CHROME_BROWSER); |
| 93 DCHECK(chrome_state); // Checked in CheckQuickEnablePreconditions. | 93 DCHECK(chrome_state); // Checked in CheckQuickEnablePreconditions. |
| 94 | 94 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 BrowserDistribution::CHROME_BINARIES), | 162 BrowserDistribution::CHROME_BINARIES), |
| 163 true)) { | 163 true)) { |
| 164 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries."; | 164 LOG(ERROR) << "Failed to set EULA consent for multi-install binaries."; |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 return status; | 168 return status; |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace installer | 171 } // namespace installer |
| OLD | NEW |