| OLD | NEW |
| 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 #include "chrome/installer/setup/chrome_frame_ready_mode.h" | 5 #include "chrome/installer/setup/chrome_frame_ready_mode.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 // Replace the ChromeFrame user agent string in the registry, modify the | 209 // Replace the ChromeFrame user agent string in the registry, modify the |
| 210 // ReadyMode state flag. | 210 // ReadyMode state flag. |
| 211 const Version& installed_version = cf_state->version(); | 211 const Version& installed_version = cf_state->version(); |
| 212 | 212 |
| 213 scoped_ptr<WorkItemList> item_list(WorkItem::CreateWorkItemList()); | 213 scoped_ptr<WorkItemList> item_list(WorkItem::CreateWorkItemList()); |
| 214 | 214 |
| 215 HKEY root = installer_state.root_key(); | 215 HKEY root = installer_state.root_key(); |
| 216 | 216 |
| 217 std::wstring chrome_frame_ua_value_name(kChromeFramePrefix); | 217 std::wstring chrome_frame_ua_value_name(kChromeFramePrefix); |
| 218 chrome_frame_ua_value_name += ASCIIToWide(installed_version.GetString()); | 218 chrome_frame_ua_value_name += |
| 219 base::ASCIIToWide(installed_version.GetString()); |
| 219 | 220 |
| 220 // Store the Chrome Frame user agent string | 221 // Store the Chrome Frame user agent string |
| 221 item_list->AddSetRegValueWorkItem(root, kPostPlatformUAKey, | 222 item_list->AddSetRegValueWorkItem(root, kPostPlatformUAKey, |
| 222 chrome_frame_ua_value_name, L"", true); | 223 chrome_frame_ua_value_name, L"", true); |
| 223 // Add a work item to update the Ready Mode state flag | 224 // Add a work item to update the Ready Mode state flag |
| 224 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( | 225 BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution( |
| 225 BrowserDistribution::CHROME_BINARIES); | 226 BrowserDistribution::CHROME_BINARIES); |
| 226 item_list->AddSetRegValueWorkItem(root, dist->GetStateKey(), | 227 item_list->AddSetRegValueWorkItem(root, dist->GetStateKey(), |
| 227 kChromeFrameReadyModeField, | 228 kChromeFrameReadyModeField, |
| 228 static_cast<int64>(1), true); | 229 static_cast<int64>(1), true); |
| 229 | 230 |
| 230 if (!item_list->Do()) { | 231 if (!item_list->Do()) { |
| 231 LOG(ERROR) << "Failed to end temporary opt out of GCF"; | 232 LOG(ERROR) << "Failed to end temporary opt out of GCF"; |
| 232 item_list->Rollback(); | 233 item_list->Rollback(); |
| 233 status = READY_MODE_END_TEMP_OPT_OUT_FAILED; | 234 status = READY_MODE_END_TEMP_OPT_OUT_FAILED; |
| 234 } | 235 } |
| 235 | 236 |
| 236 return status; | 237 return status; |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace installer | 240 } // namespace installer |
| OLD | NEW |