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

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

Issue 10905188: Have different text for apps and regular extensions in some more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more change 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/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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 463 }
464 464
465 void CrxInstaller::CompleteInstall() { 465 void CrxInstaller::CompleteInstall() {
466 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 466 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
467 467
468 if (!current_version_.empty()) { 468 if (!current_version_.empty()) {
469 Version current_version(current_version_); 469 Version current_version(current_version_);
470 if (current_version.CompareTo(*(extension_->version())) > 0) { 470 if (current_version.CompareTo(*(extension_->version())) > 0) {
471 ReportFailureFromFileThread( 471 ReportFailureFromFileThread(
472 CrxInstallerError( 472 CrxInstallerError(
473 l10n_util::GetStringUTF16(IDS_EXTENSION_CANT_DOWNGRADE_VERSION))); 473 l10n_util::GetStringUTF16(extension_->is_app() ?
474 IDS_APP_CANT_DOWNGRADE_VERSION :
475 IDS_EXTENSION_CANT_DOWNGRADE_VERSION)));
474 return; 476 return;
475 } 477 }
476 } 478 }
477 479
478 // See how long extension install paths are. This is important on 480 // See how long extension install paths are. This is important on
479 // windows, because file operations may fail if the path to a file 481 // windows, because file operations may fail if the path to a file
480 // exceeds a small constant. See crbug.com/69693 . 482 // exceeds a small constant. See crbug.com/69693 .
481 UMA_HISTOGRAM_CUSTOM_COUNTS( 483 UMA_HISTOGRAM_CUSTOM_COUNTS(
482 "Extensions.CrxInstallDirPathLength", 484 "Extensions.CrxInstallDirPathLength",
483 install_directory_.value().length(), 0, 500, 100); 485 install_directory_.value().length(), 0, 500, 100);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 // is problematic because they don't know anything about the 617 // is problematic because they don't know anything about the
616 // extension before it is unpacked, so they cannot filter based 618 // extension before it is unpacked, so they cannot filter based
617 // on the extension. 619 // on the extension.
618 content::NotificationService::current()->Notify( 620 content::NotificationService::current()->Notify(
619 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 621 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
620 content::Source<CrxInstaller>(this), 622 content::Source<CrxInstaller>(this),
621 content::Details<const Extension>(extension)); 623 content::Details<const Extension>(extension));
622 } 624 }
623 625
624 } // namespace extensions 626 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698