| 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 "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 #include "base/win/win_util.h" | 10 #include "base/win/win_util.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 switch (result) { | 177 switch (result) { |
| 178 case UPGRADE_CHECK_STARTED: { | 178 case UPGRADE_CHECK_STARTED: { |
| 179 status = CHECKING; | 179 status = CHECKING; |
| 180 break; | 180 break; |
| 181 } | 181 } |
| 182 case UPGRADE_STARTED: { | 182 case UPGRADE_STARTED: { |
| 183 status = UPDATING; | 183 status = UPDATING; |
| 184 break; | 184 break; |
| 185 } | 185 } |
| 186 case UPGRADE_IS_AVAILABLE: { | 186 case UPGRADE_IS_AVAILABLE: { |
| 187 DCHECK(!google_updater_); // Should have been nulled out already. | 187 DCHECK(!google_updater_.get()); // Should have been nulled out already. |
| 188 CreateGoogleUpdater(); | 188 CreateGoogleUpdater(); |
| 189 UpdateStatus(UPGRADE_STARTED, GOOGLE_UPDATE_NO_ERROR, base::string16()); | 189 UpdateStatus(UPGRADE_STARTED, GOOGLE_UPDATE_NO_ERROR, base::string16()); |
| 190 // Specify true to upgrade now. | 190 // Specify true to upgrade now. |
| 191 google_updater_->CheckForUpdate(true, GetElevationParent()); | 191 google_updater_->CheckForUpdate(true, GetElevationParent()); |
| 192 return; | 192 return; |
| 193 } | 193 } |
| 194 case UPGRADE_ALREADY_UP_TO_DATE: { | 194 case UPGRADE_ALREADY_UP_TO_DATE: { |
| 195 // Google Update reported that Chrome is up-to-date. | 195 // Google Update reported that Chrome is up-to-date. |
| 196 // To confirm the updated version is running, the reading | 196 // To confirm the updated version is running, the reading |
| 197 // must be done on the file thread. The rest of this case | 197 // must be done on the file thread. The rest of this case |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 << GetCurrentThreadId(); | 288 << GetCurrentThreadId(); |
| 289 #endif | 289 #endif |
| 290 return window; | 290 return window; |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace | 293 } // namespace |
| 294 | 294 |
| 295 VersionUpdater* VersionUpdater::Create(content::BrowserContext* /* context */) { | 295 VersionUpdater* VersionUpdater::Create(content::BrowserContext* /* context */) { |
| 296 return new VersionUpdaterWin; | 296 return new VersionUpdaterWin; |
| 297 } | 297 } |
| OLD | NEW |