| OLD | NEW |
| 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_EXTENSIONS_PACK_EXTENSION_JOB_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 const FilePath& key_file); | 34 const FilePath& key_file); |
| 35 | 35 |
| 36 // Starts the packing thread job. See http://crbug.com/27944 for more details | 36 // Starts the packing thread job. See http://crbug.com/27944 for more details |
| 37 // on why this function is needed. | 37 // on why this function is needed. |
| 38 void Start(); | 38 void Start(); |
| 39 | 39 |
| 40 // The client should call this when it is destroyed to prevent | 40 // The client should call this when it is destroyed to prevent |
| 41 // PackExtensionJob from attempting to access it. | 41 // PackExtensionJob from attempting to access it. |
| 42 void ClearClient(); | 42 void ClearClient(); |
| 43 | 43 |
| 44 // The standard packing success message. |
| 45 static std::wstring StandardSuccessMessage(const FilePath& crx_file, |
| 46 const FilePath& key_file); |
| 47 |
| 44 private: | 48 private: |
| 45 friend class base::RefCountedThreadSafe<PackExtensionJob>; | 49 friend class base::RefCountedThreadSafe<PackExtensionJob>; |
| 46 | 50 |
| 47 ~PackExtensionJob() {} | 51 ~PackExtensionJob() {} |
| 48 | 52 |
| 49 void RunOnFileThread(); | 53 void RunOnFileThread(); |
| 50 void ReportSuccessOnUIThread(); | 54 void ReportSuccessOnClientThread(); |
| 51 void ReportFailureOnUIThread(const std::string& error); | 55 void ReportFailureOnClientThread(const std::string& error); |
| 52 | 56 |
| 53 ChromeThread::ID client_thread_id_; | 57 ChromeThread::ID client_thread_id_; |
| 54 Client* client_; | 58 Client* client_; |
| 55 FilePath root_directory_; | 59 FilePath root_directory_; |
| 56 FilePath key_file_; | 60 FilePath key_file_; |
| 57 FilePath crx_file_out_; | 61 FilePath crx_file_out_; |
| 58 FilePath key_file_out_; | 62 FilePath key_file_out_; |
| 59 | 63 |
| 60 DISALLOW_COPY_AND_ASSIGN(PackExtensionJob); | 64 DISALLOW_COPY_AND_ASSIGN(PackExtensionJob); |
| 61 }; | 65 }; |
| 62 | 66 |
| 63 #endif // CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_ | 67 #endif // CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_H_ |
| OLD | NEW |