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

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

Issue 436008: Fixes extension packing codepath that was hitting a race condition DCHECK des... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « no previous file | chrome/browser/extensions/pack_extension_job.h » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include "app/gfx/codec/png_codec.h" 7 #include "app/gfx/codec/png_codec.h"
8 #include "app/gfx/color_utils.h" 8 #include "app/gfx/color_utils.h"
9 #include "app/gfx/skbitmap_operations.h" 9 #include "app/gfx/skbitmap_operations.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 return; 478 return;
479 } 479 }
480 480
481 if (!private_key_path.empty() && key_file.empty()) { 481 if (!private_key_path.empty() && key_file.empty()) {
482 ShowAlert(l10n_util::GetStringUTF8( 482 ShowAlert(l10n_util::GetStringUTF8(
483 IDS_EXTENSION_PACK_DIALOG_ERROR_KEY_INVALID)); 483 IDS_EXTENSION_PACK_DIALOG_ERROR_KEY_INVALID));
484 return; 484 return;
485 } 485 }
486 486
487 pack_job_ = new PackExtensionJob(this, root_directory, key_file); 487 pack_job_ = new PackExtensionJob(this, root_directory, key_file);
488 pack_job_->Start();
488 } 489 }
489 490
490 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file, 491 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file,
491 const FilePath& pem_file) { 492 const FilePath& pem_file) {
492 std::string message; 493 std::string message;
493 if (!pem_file.empty()) { 494 if (!pem_file.empty()) {
494 message = WideToASCII(l10n_util::GetStringF( 495 message = WideToASCII(l10n_util::GetStringF(
495 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, 496 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW,
496 crx_file.ToWStringHack(), 497 crx_file.ToWStringHack(),
497 pem_file.ToWStringHack())); 498 pem_file.ToWStringHack()));
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 // static 746 // static
746 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 747 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
747 return ResourceBundle::GetSharedInstance(). 748 return ResourceBundle::GetSharedInstance().
748 LoadImageResourceBytes(IDR_PLUGIN); 749 LoadImageResourceBytes(IDR_PLUGIN);
749 } 750 }
750 751
751 // static 752 // static
752 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 753 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
753 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 754 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
754 } 755 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/pack_extension_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698