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

Side by Side Diff: chrome/browser/utility_process_host.h

Issue 526012: Merge 32345 - Parse messages.json in ExtensionUnpacker (like we do for manife... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 10 years, 11 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
« no previous file with comments | « chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_UTILITY_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_UTILITY_PROCESS_HOST_H_
6 #define CHROME_BROWSER_UTILITY_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_UTILITY_PROCESS_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 // get results back. All functions are called on the thread passed along 28 // get results back. All functions are called on the thread passed along
29 // to UtilityProcessHost. 29 // to UtilityProcessHost.
30 class Client : public base::RefCountedThreadSafe<Client> { 30 class Client : public base::RefCountedThreadSafe<Client> {
31 public: 31 public:
32 Client() {} 32 Client() {}
33 33
34 // Called when the process has crashed. 34 // Called when the process has crashed.
35 virtual void OnProcessCrashed() {} 35 virtual void OnProcessCrashed() {}
36 36
37 // Called when the extension has unpacked successfully. |manifest| is the 37 // Called when the extension has unpacked successfully. |manifest| is the
38 // parsed manifest.json file. |images| contains a list of decoded images 38 // parsed manifest.json file. |catalogs| contains list of all parsed
39 // and the associated paths where those images live on disk. 39 // message catalogs. |images| contains a list of decoded images and the
40 virtual void OnUnpackExtensionSucceeded(const DictionaryValue& manifest) {} 40 // associated paths where those images live on disk.
41 virtual void OnUnpackExtensionSucceeded(const DictionaryValue& manifest,
42 const DictionaryValue& catalogs) {}
41 43
42 // Called when an error occurred while unpacking the extension. 44 // Called when an error occurred while unpacking the extension.
43 // |error_message| contains a description of the problem. 45 // |error_message| contains a description of the problem.
44 virtual void OnUnpackExtensionFailed(const std::string& error_message) {} 46 virtual void OnUnpackExtensionFailed(const std::string& error_message) {}
45 47
46 // Called when the web resource has been successfully parsed. |json_data| 48 // Called when the web resource has been successfully parsed. |json_data|
47 // contains the parsed list of web resource items downloaded from the 49 // contains the parsed list of web resource items downloaded from the
48 // web resource server. 50 // web resource server.
49 virtual void OnUnpackWebResourceSucceeded( 51 virtual void OnUnpackWebResourceSucceeded(
50 const DictionaryValue& json_data) {} 52 const DictionaryValue& json_data) {}
51 53
52 // Called when an error occurred while parsing the resource data. 54 // Called when an error occurred while parsing the resource data.
53 // |error_message| contains a description of the problem. 55 // |error_message| contains a description of the problem.
54 virtual void OnUnpackWebResourceFailed( 56 virtual void OnUnpackWebResourceFailed(const std::string& error_message) {}
55 const std::string& error_message) {}
56 57
57 // Called when an update manifest xml file was successfully parsed. 58 // Called when an update manifest xml file was successfully parsed.
58 virtual void OnParseUpdateManifestSucceeded( 59 virtual void OnParseUpdateManifestSucceeded(
59 const UpdateManifest::ResultList& list) {} 60 const UpdateManifest::ResultList& list) {}
60 61
61 // Called when an update manifest xml file failed parsing. |error_message| 62 // Called when an update manifest xml file failed parsing. |error_message|
62 // contains details suitable for logging. 63 // contains details suitable for logging.
63 virtual void OnParseUpdateManifestFailed( 64 virtual void OnParseUpdateManifestFailed(
64 const std::string& error_message) {} 65 const std::string& error_message) {}
65 66
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 119 }
119 120
120 // A pointer to our client interface, who will be informed of progress. 121 // A pointer to our client interface, who will be informed of progress.
121 scoped_refptr<Client> client_; 122 scoped_refptr<Client> client_;
122 ChromeThread::ID client_thread_id_; 123 ChromeThread::ID client_thread_id_;
123 124
124 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost); 125 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHost);
125 }; 126 };
126 127
127 #endif // CHROME_BROWSER_UTILITY_PROCESS_HOST_H_ 128 #endif // CHROME_BROWSER_UTILITY_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698