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 #ifndef CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 int64 current, | 316 int64 current, |
317 int64 total) OVERRIDE; | 317 int64 total) OVERRIDE; |
318 | 318 |
319 // NetworkStateHandlerObserver override. | 319 // NetworkStateHandlerObserver override. |
320 virtual void DefaultNetworkChanged(const NetworkState* network) OVERRIDE; | 320 virtual void DefaultNetworkChanged(const NetworkState* network) OVERRIDE; |
321 | 321 |
322 // Creates directory image will be downloaded to. | 322 // Creates directory image will be downloaded to. |
323 // Must be called from FILE thread. | 323 // Must be called from FILE thread. |
324 void CreateImageDir(); | 324 void CreateImageDir(); |
325 | 325 |
326 // Returns directory image should be dopwnloaded to. | 326 // Returns the directory to which the recovery image should be downloaded. |
327 // The directory has to be previously created. | 327 // If the directory hasn't been previously created, an empty path is returned |
328 const base::FilePath& GetImageDir(); | 328 // (in which case |CreateImageDir()| should be called). |
| 329 base::FilePath GetImageDir(); |
329 | 330 |
330 const base::FilePath& target_device_path() { return target_device_path_; } | 331 const base::FilePath& target_device_path() { return target_device_path_; } |
331 void set_target_device_path(const base::FilePath& path) { | 332 void set_target_device_path(const base::FilePath& path) { |
332 target_device_path_ = path; | 333 target_device_path_ = path; |
333 } | 334 } |
334 | 335 |
335 const base::FilePath& target_file_path() { return target_file_path_; } | 336 const base::FilePath& target_file_path() { return target_file_path_; } |
336 void set_target_file_path(const base::FilePath& path) { | 337 void set_target_file_path(const base::FilePath& path) { |
337 target_file_path_ = path; | 338 target_file_path_ = path; |
338 } | 339 } |
(...skipping 23 matching lines...) Expand all Loading... |
362 const std::string& error); | 363 const std::string& error); |
363 void OnBurnProgressUpdate(const std::string& target_path, | 364 void OnBurnProgressUpdate(const std::string& target_path, |
364 int64 num_bytes_burnt, | 365 int64 num_bytes_burnt, |
365 int64 total_size); | 366 int64 total_size); |
366 | 367 |
367 void NotifyDeviceAdded(const disks::DiskMountManager::Disk& disk); | 368 void NotifyDeviceAdded(const disks::DiskMountManager::Disk& disk); |
368 void NotifyDeviceRemoved(const disks::DiskMountManager::Disk& disk); | 369 void NotifyDeviceRemoved(const disks::DiskMountManager::Disk& disk); |
369 | 370 |
370 BurnDeviceHandler device_handler_; | 371 BurnDeviceHandler device_handler_; |
371 | 372 |
| 373 bool image_dir_created_; |
372 bool unzipping_; | 374 bool unzipping_; |
373 bool cancelled_; | 375 bool cancelled_; |
374 bool burning_; | 376 bool burning_; |
375 bool block_burn_signals_; | 377 bool block_burn_signals_; |
376 | 378 |
377 base::FilePath image_dir_; | 379 base::FilePath image_dir_; |
378 base::FilePath zip_image_file_path_; | 380 base::FilePath zip_image_file_path_; |
379 base::FilePath source_image_path_; | 381 base::FilePath source_image_path_; |
380 base::FilePath target_device_path_; | 382 base::FilePath target_device_path_; |
381 base::FilePath target_file_path_; | 383 base::FilePath target_file_path_; |
(...skipping 20 matching lines...) Expand all Loading... |
402 base::WeakPtrFactory<BurnManager> weak_ptr_factory_; | 404 base::WeakPtrFactory<BurnManager> weak_ptr_factory_; |
403 | 405 |
404 DISALLOW_COPY_AND_ASSIGN(BurnManager); | 406 DISALLOW_COPY_AND_ASSIGN(BurnManager); |
405 }; | 407 }; |
406 | 408 |
407 } // namespace imageburner | 409 } // namespace imageburner |
408 | 410 |
409 } // namespace chromeos | 411 } // namespace chromeos |
410 | 412 |
411 #endif // CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ | 413 #endif // CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ |
OLD | NEW |