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

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

Issue 165216: Revert 22874 - Merge 21719 Make possible reloading extensions from the chrom... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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
Property Changes:
Modified: svn:mergeinfo
Reverse-merged /trunk/src/chrome/browser/extensions/extensions_service.cc:r21719
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_service.h" 5 #include "chrome/browser/extensions/extensions_service.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/crypto/signature_verifier.h" 9 #include "base/crypto/signature_verifier.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 << "installed"; 347 << "installed";
348 FireInstallCallback(extension_path, NULL); 348 FireInstallCallback(extension_path, NULL);
349 return; 349 return;
350 } 350 }
351 351
352 backend_loop_->PostTask(FROM_HERE, NewRunnableMethod(backend_.get(), 352 backend_loop_->PostTask(FROM_HERE, NewRunnableMethod(backend_.get(),
353 &ExtensionsServiceBackend::UpdateExtension, id, extension_path, 353 &ExtensionsServiceBackend::UpdateExtension, id, extension_path,
354 alert_on_error, scoped_refptr<ExtensionsService>(this))); 354 alert_on_error, scoped_refptr<ExtensionsService>(this)));
355 } 355 }
356 356
357 void ExtensionsService::ReloadExtension(const std::string& extension_id) {
358 Extension* extension = GetExtensionById(extension_id);
359 FilePath extension_path = extension->path();
360
361 UnloadExtension(extension_id);
362 LoadExtension(extension_path);
363 }
364
365 void ExtensionsService::UninstallExtension(const std::string& extension_id, 357 void ExtensionsService::UninstallExtension(const std::string& extension_id,
366 bool external_uninstall) { 358 bool external_uninstall) {
367 Extension* extension = GetExtensionById(extension_id); 359 Extension* extension = GetExtensionById(extension_id);
368 360
369 // Callers should not send us nonexistant extensions. 361 // Callers should not send us nonexistant extensions.
370 DCHECK(extension); 362 DCHECK(extension);
371 363
372 extension_prefs_->OnExtensionUninstalled(extension, external_uninstall); 364 extension_prefs_->OnExtensionUninstalled(extension, external_uninstall);
373 365
374 // Tell the backend to start deleting installed extensions on the file thread. 366 // Tell the backend to start deleting installed extensions on the file thread.
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 Extension::InstallType install_type = 1502 Extension::InstallType install_type =
1511 CompareToInstalledVersion(id, version->GetString(), &current_version); 1503 CompareToInstalledVersion(id, version->GetString(), &current_version);
1512 1504
1513 if (install_type == Extension::DOWNGRADE) 1505 if (install_type == Extension::DOWNGRADE)
1514 return false; 1506 return false;
1515 1507
1516 return (install_type == Extension::UPGRADE || 1508 return (install_type == Extension::UPGRADE ||
1517 install_type == Extension::NEW_INSTALL || 1509 install_type == Extension::NEW_INSTALL ||
1518 NeedsReinstall(id, current_version)); 1510 NeedsReinstall(id, current_version));
1519 } 1511 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service.h ('k') | chrome/browser/extensions/extensions_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698