OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/extensions/extension_creator.h" | 11 #include "chrome/browser/extensions/extension_creator.h" |
12 #include "chrome/common/chrome_constants.h" | 12 #include "chrome/common/chrome_constants.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 | 15 |
| 16 using content::BrowserThread; |
| 17 |
16 PackExtensionJob::PackExtensionJob(Client* client, | 18 PackExtensionJob::PackExtensionJob(Client* client, |
17 const FilePath& root_directory, | 19 const FilePath& root_directory, |
18 const FilePath& key_file) | 20 const FilePath& key_file) |
19 : client_(client), key_file_(key_file), asynchronous_(true) { | 21 : client_(client), key_file_(key_file), asynchronous_(true) { |
20 root_directory_ = root_directory.StripTrailingSeparators(); | 22 root_directory_ = root_directory.StripTrailingSeparators(); |
21 CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_)); | 23 CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_)); |
22 } | 24 } |
23 | 25 |
24 void PackExtensionJob::Start() { | 26 void PackExtensionJob::Start() { |
25 if (asynchronous_) { | 27 if (asynchronous_) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return l10n_util::GetStringFUTF16( | 90 return l10n_util::GetStringFUTF16( |
89 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE, | 91 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE, |
90 crx_file_string); | 92 crx_file_string); |
91 } else { | 93 } else { |
92 return l10n_util::GetStringFUTF16( | 94 return l10n_util::GetStringFUTF16( |
93 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, | 95 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, |
94 crx_file_string, | 96 crx_file_string, |
95 key_file_string); | 97 key_file_string); |
96 } | 98 } |
97 } | 99 } |
OLD | NEW |