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

Side by Side Diff: chrome/browser/chromeos/imageburner/burn_controller.cc

Issue 9568001: Use URLFetcher to download ChromeOS recovery image config file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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/browser/chromeos/imageburner/burn_controller.h" 5 #include "chrome/browser/chromeos/imageburner/burn_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/chromeos/cros/burn_library.h" 10 #include "chrome/browser/chromeos/cros/burn_library.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 virtual void OnError(int error_message_id) OVERRIDE { 204 virtual void OnError(int error_message_id) OVERRIDE {
205 delegate_->OnFail(error_message_id); 205 delegate_->OnFail(error_message_id);
206 working_ = false; 206 working_ = false;
207 } 207 }
208 208
209 // Part of BurnManager::Delegate interface. 209 // Part of BurnManager::Delegate interface.
210 virtual void OnImageDirCreated(bool success) OVERRIDE { 210 virtual void OnImageDirCreated(bool success) OVERRIDE {
211 if (success) { 211 if (success) {
212 zip_image_file_path_ = 212 zip_image_file_path_ =
213 burn_manager_->GetImageDir().Append(kImageZipFileName); 213 burn_manager_->GetImageDir().Append(kImageZipFileName);
214 burn_manager_->FetchConfigFile(web_contents_, this); 214 burn_manager_->FetchConfigFile(this);
215 } else { 215 } else {
216 DownloadCompleted(success); 216 DownloadCompleted(success);
217 } 217 }
218 } 218 }
219 219
220 // Part of BurnManager::Delegate interface. 220 // Part of BurnManager::Delegate interface.
221 virtual void OnConfigFileFetched(const ConfigFile& config_file, bool success) 221 virtual void OnConfigFileFetched(const ConfigFile& config_file, bool success)
222 OVERRIDE { 222 OVERRIDE {
223 if (!success || !ExtractInfoFromConfigFile(config_file)) { 223 if (!success || !ExtractInfoFromConfigFile(config_file)) {
224 DownloadCompleted(false); 224 DownloadCompleted(false);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 // static 453 // static
454 BurnController* BurnController::CreateBurnController( 454 BurnController* BurnController::CreateBurnController(
455 content::WebContents* web_contents, 455 content::WebContents* web_contents,
456 Delegate* delegate) { 456 Delegate* delegate) {
457 return new BurnControllerImpl(web_contents, delegate); 457 return new BurnControllerImpl(web_contents, delegate);
458 } 458 }
459 459
460 } // namespace imageburner 460 } // namespace imageburner
461 } // namespace chromeos 461 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/imageburner/burn_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698