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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |