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 #include "chrome/browser/extensions/pack_extension_job.h" | 5 #include "chrome/browser/extensions/pack_extension_job.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "base/task.h" | 10 #include "base/task.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 void PackExtensionJob::Start() { | 23 void PackExtensionJob::Start() { |
24 BrowserThread::PostTask( | 24 BrowserThread::PostTask( |
25 BrowserThread::FILE, FROM_HERE, | 25 BrowserThread::FILE, FROM_HERE, |
26 NewRunnableMethod(this, &PackExtensionJob::RunOnFileThread)); | 26 NewRunnableMethod(this, &PackExtensionJob::RunOnFileThread)); |
27 } | 27 } |
28 | 28 |
29 void PackExtensionJob::ClearClient() { | 29 void PackExtensionJob::ClearClient() { |
30 client_ = NULL; | 30 client_ = NULL; |
31 } | 31 } |
32 | 32 |
| 33 PackExtensionJob::~PackExtensionJob() {} |
| 34 |
33 void PackExtensionJob::RunOnFileThread() { | 35 void PackExtensionJob::RunOnFileThread() { |
34 crx_file_out_ = FilePath(root_directory_.value() + | 36 crx_file_out_ = FilePath(root_directory_.value() + |
35 chrome::kExtensionFileExtension); | 37 chrome::kExtensionFileExtension); |
36 | 38 |
37 if (key_file_.empty()) | 39 if (key_file_.empty()) |
38 key_file_out_ = FilePath(root_directory_.value() + | 40 key_file_out_ = FilePath(root_directory_.value() + |
39 chrome::kExtensionKeyFileExtension); | 41 chrome::kExtensionKeyFileExtension); |
40 | 42 |
41 // TODO(aa): Need to internationalize the errors that ExtensionCreator | 43 // TODO(aa): Need to internationalize the errors that ExtensionCreator |
42 // returns. See bug 20734. | 44 // returns. See bug 20734. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 return l10n_util::GetStringF( | 78 return l10n_util::GetStringF( |
77 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE, | 79 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE, |
78 crx_file.ToWStringHack()); | 80 crx_file.ToWStringHack()); |
79 } else { | 81 } else { |
80 return l10n_util::GetStringF( | 82 return l10n_util::GetStringF( |
81 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, | 83 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, |
82 crx_file.ToWStringHack(), | 84 crx_file.ToWStringHack(), |
83 key_file.ToWStringHack()); | 85 key_file.ToWStringHack()); |
84 } | 86 } |
85 } | 87 } |
OLD | NEW |