| 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_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 class UtilityProcessHost; | 25 class UtilityProcessHost; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace net { | 28 namespace net { |
| 29 class URLFetcher; | 29 class URLFetcher; |
| 30 class URLRequestContextGetter; | 30 class URLRequestContextGetter; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace extensions { |
| 34 |
| 33 // This is a class to help dealing with webstore-provided data. It manages | 35 // This is a class to help dealing with webstore-provided data. It manages |
| 34 // sending work to the utility process for parsing manifests and | 36 // sending work to the utility process for parsing manifests and |
| 35 // fetching/decoding icon data. Clients must implement the | 37 // fetching/decoding icon data. Clients must implement the |
| 36 // WebstoreInstallHelper::Delegate interface to receive the parsed data. | 38 // WebstoreInstallHelper::Delegate interface to receive the parsed data. |
| 37 class WebstoreInstallHelper : public content::UtilityProcessHostClient, | 39 class WebstoreInstallHelper : public content::UtilityProcessHostClient, |
| 38 public net::URLFetcherDelegate { | 40 public net::URLFetcherDelegate { |
| 39 public: | 41 public: |
| 40 class Delegate { | 42 class Delegate { |
| 41 public: | 43 public: |
| 42 enum InstallHelperResultCode { | 44 enum InstallHelperResultCode { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 scoped_ptr<base::DictionaryValue> parsed_manifest_; | 127 scoped_ptr<base::DictionaryValue> parsed_manifest_; |
| 126 | 128 |
| 127 // A details string for keeping track of any errors. | 129 // A details string for keeping track of any errors. |
| 128 std::string error_; | 130 std::string error_; |
| 129 | 131 |
| 130 // A code to distinguish between an error with the icon, and an error with the | 132 // A code to distinguish between an error with the icon, and an error with the |
| 131 // manifest. | 133 // manifest. |
| 132 Delegate::InstallHelperResultCode parse_error_; | 134 Delegate::InstallHelperResultCode parse_error_; |
| 133 }; | 135 }; |
| 134 | 136 |
| 137 } // namespace extensions |
| 138 |
| 135 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ | 139 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_HELPER_H_ |
| OLD | NEW |