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

Side by Side Diff: chrome/browser/extensions/pack_extension_job.cc

Issue 10912041: Disallow packing or loading unpacked manifest v1 extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blarh Created 8 years, 3 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
OLDNEW
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 #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; 16 using content::BrowserThread;
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 PackExtensionJob::PackExtensionJob(Client* client, 20 PackExtensionJob::PackExtensionJob(Client* client,
21 const FilePath& root_directory, 21 const FilePath& root_directory,
22 const FilePath& key_file, 22 const FilePath& key_file,
23 int run_flags) 23 int run_flags)
24 : client_(client), key_file_(key_file), asynchronous_(true), 24 : client_(client), key_file_(key_file), asynchronous_(true),
25 run_flags_(run_flags) { 25 run_flags_(run_flags | ExtensionCreator::kRequireModernManifestVersion) {
26 root_directory_ = root_directory.StripTrailingSeparators(); 26 root_directory_ = root_directory.StripTrailingSeparators();
27 CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_)); 27 CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_));
28 } 28 }
29 29
30 void PackExtensionJob::Start() { 30 void PackExtensionJob::Start() {
31 if (asynchronous_) { 31 if (asynchronous_) {
32 BrowserThread::PostTask( 32 BrowserThread::PostTask(
33 BrowserThread::FILE, FROM_HERE, 33 BrowserThread::FILE, FROM_HERE,
34 base::Bind(&PackExtensionJob::Run, this)); 34 base::Bind(&PackExtensionJob::Run, this));
35 } else { 35 } else {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 crx_file_string); 100 crx_file_string);
101 } else { 101 } else {
102 return l10n_util::GetStringFUTF16( 102 return l10n_util::GetStringFUTF16(
103 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, 103 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW,
104 crx_file_string, 104 crx_file_string,
105 key_file_string); 105 key_file_string);
106 } 106 }
107 } 107 }
108 108
109 } // namespace extensions 109 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/pack_extension_job.h ('k') | chrome/browser/extensions/unpacked_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698