| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "content/public/common/url_fetcher_delegate.h" | |
| 19 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 19 #include "net/url_request/url_fetcher_delegate.h" |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 namespace imageburner { | 22 namespace imageburner { |
| 23 | 23 |
| 24 // Config file properties. | 24 // Config file properties. |
| 25 extern const char kName[]; | 25 extern const char kName[]; |
| 26 extern const char kHwid[]; | 26 extern const char kHwid[]; |
| 27 extern const char kFileName[]; | 27 extern const char kFileName[]; |
| 28 extern const char kUrl[]; | 28 extern const char kUrl[]; |
| 29 | 29 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 bool download_started_; | 147 bool download_started_; |
| 148 bool download_finished_; | 148 bool download_finished_; |
| 149 | 149 |
| 150 State state_; | 150 State state_; |
| 151 | 151 |
| 152 ObserverList<Observer> observers_; | 152 ObserverList<Observer> observers_; |
| 153 | 153 |
| 154 DISALLOW_COPY_AND_ASSIGN(StateMachine); | 154 DISALLOW_COPY_AND_ASSIGN(StateMachine); |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 class BurnManager : content::URLFetcherDelegate { | 157 class BurnManager : net::URLFetcherDelegate { |
| 158 public: | 158 public: |
| 159 | 159 |
| 160 class Delegate : public base::SupportsWeakPtr<Delegate> { | 160 class Delegate : public base::SupportsWeakPtr<Delegate> { |
| 161 public: | 161 public: |
| 162 virtual void OnImageDirCreated(bool success) = 0; | 162 virtual void OnImageDirCreated(bool success) = 0; |
| 163 virtual void OnConfigFileFetched(bool success, | 163 virtual void OnConfigFileFetched(bool success, |
| 164 const std::string& image_file_name, | 164 const std::string& image_file_name, |
| 165 const GURL& image_download_url) = 0; | 165 const GURL& image_download_url) = 0; |
| 166 }; | 166 }; |
| 167 | 167 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 ObserverList<Observer> observers_; | 261 ObserverList<Observer> observers_; |
| 262 | 262 |
| 263 DISALLOW_COPY_AND_ASSIGN(BurnManager); | 263 DISALLOW_COPY_AND_ASSIGN(BurnManager); |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 } // namespace imageburner | 266 } // namespace imageburner |
| 267 | 267 |
| 268 } // namespace chromeos | 268 } // namespace chromeos |
| 269 | 269 |
| 270 #endif // CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ | 270 #endif // CHROME_BROWSER_CHROMEOS_IMAGEBURNER_BURN_MANAGER_H_ |
| OLD | NEW |