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

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

Issue 9456019: Add GTK interface for installing bundles of extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 8 years, 10 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/crx_installer.h" 5 #include "chrome/browser/extensions/crx_installer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 current_version_ = 410 current_version_ =
411 frontend_weak_->extension_prefs()->GetVersionString(extension_->id()); 411 frontend_weak_->extension_prefs()->GetVersionString(extension_->id());
412 412
413 // TODO(asargent) - remove this when we fully deprecate the old install api. 413 // TODO(asargent) - remove this when we fully deprecate the old install api.
414 ClearWhitelistedInstallId(extension_->id()); 414 ClearWhitelistedInstallId(extension_->id());
415 415
416 bool whitelisted = false; 416 bool whitelisted = false;
417 scoped_ptr<CrxInstaller::WhitelistEntry> entry( 417 scoped_ptr<CrxInstaller::WhitelistEntry> entry(
418 RemoveWhitelistEntry(extension_->id())); 418 RemoveWhitelistEntry(extension_->id()));
419 if (is_gallery_install() && entry.get() && original_manifest_.get()) { 419 if (is_gallery_install() && entry.get() && original_manifest_.get()) {
420 whitelisted = true;
421 if (entry->use_app_installed_bubble)
422 client_->set_use_app_installed_bubble(true);
423 if (entry->skip_post_install_ui)
424 client_->set_skip_post_install_ui(true);
425
420 if (!(original_manifest_->Equals(entry->parsed_manifest.get()))) { 426 if (!(original_manifest_->Equals(entry->parsed_manifest.get()))) {
421 ReportFailureFromUIThread( 427 ReportFailureFromUIThread(
422 l10n_util::GetStringUTF16(IDS_EXTENSION_MANIFEST_INVALID)); 428 l10n_util::GetStringUTF16(IDS_EXTENSION_MANIFEST_INVALID));
423 return; 429 return;
424 } 430 }
425 whitelisted = true;
426 if (entry->use_app_installed_bubble)
427 client_->set_use_app_installed_bubble(true);
428 if (entry->skip_post_install_ui)
429 client_->set_skip_post_install_ui(true);
430 } 431 }
431 432
432 if (client_ && 433 if (client_ &&
433 (!allow_silent_install_ || !whitelisted)) { 434 (!allow_silent_install_ || !whitelisted)) {
434 AddRef(); // Balanced in Proceed() and Abort(). 435 AddRef(); // Balanced in Proceed() and Abort().
435 client_->ConfirmInstall(this, extension_.get()); 436 client_->ConfirmInstall(this, extension_.get());
436 } else { 437 } else {
437 if (!BrowserThread::PostTask( 438 if (!BrowserThread::PostTask(
438 BrowserThread::FILE, FROM_HERE, 439 BrowserThread::FILE, FROM_HERE,
439 base::Bind(&CrxInstaller::CompleteInstall, this))) 440 base::Bind(&CrxInstaller::CompleteInstall, this)))
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 // Some users (such as the download shelf) need to know when a 611 // Some users (such as the download shelf) need to know when a
611 // CRXInstaller is done. Listening for the EXTENSION_* events 612 // CRXInstaller is done. Listening for the EXTENSION_* events
612 // is problematic because they don't know anything about the 613 // is problematic because they don't know anything about the
613 // extension before it is unpacked, so they cannot filter based 614 // extension before it is unpacked, so they cannot filter based
614 // on the extension. 615 // on the extension.
615 content::NotificationService::current()->Notify( 616 content::NotificationService::current()->Notify(
616 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 617 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
617 content::Source<CrxInstaller>(this), 618 content::Source<CrxInstaller>(this),
618 content::Details<const Extension>(extension)); 619 content::Details<const Extension>(extension));
619 } 620 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/bundle_installer.cc ('k') | chrome/browser/extensions/extension_install_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698