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

Side by Side Diff: chrome/browser/extensions/api/management/management_api.cc

Issue 284103002: Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
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/api/management/management_api.h" 5 #include "chrome/browser/extensions/api/management/management_api.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 // static 575 // static
576 void ManagementUninstallFunctionBase::SetAutoConfirmForTest( 576 void ManagementUninstallFunctionBase::SetAutoConfirmForTest(
577 bool should_proceed) { 577 bool should_proceed) {
578 auto_confirm_for_test = should_proceed ? PROCEED : ABORT; 578 auto_confirm_for_test = should_proceed ? PROCEED : ABORT;
579 } 579 }
580 580
581 void ManagementUninstallFunctionBase::Finish(bool should_uninstall) { 581 void ManagementUninstallFunctionBase::Finish(bool should_uninstall) {
582 if (should_uninstall) { 582 if (should_uninstall) {
583 bool success = service()->UninstallExtension( 583 bool success = service()->UninstallExtension(
584 extension_id_, 584 extension_id_, ExtensionService::kUninstallReasonDefault, NULL);
Devlin 2014/05/14 23:14:20 I think ManagementAPI should more likely be user i
not at google - send to devlin 2014/05/14 23:17:02 If somebody writes an extension management extensi
rpaquay 2014/06/30 23:16:18 Done.
585 false, /* external uninstall */
586 NULL);
587 585
588 // TODO set error_ if !success 586 // TODO set error_ if !success
589 SendResponse(success); 587 SendResponse(success);
590 } else { 588 } else {
591 error_ = ErrorUtils::FormatErrorMessage( 589 error_ = ErrorUtils::FormatErrorMessage(
592 keys::kUninstallCanceledError, extension_id_); 590 keys::kUninstallCanceledError, extension_id_);
593 SendResponse(false); 591 SendResponse(false);
594 } 592 }
595 593
596 } 594 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 return g_factory.Pointer(); 812 return g_factory.Pointer();
815 } 813 }
816 814
817 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { 815 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) {
818 management_event_router_.reset( 816 management_event_router_.reset(
819 new ManagementEventRouter(Profile::FromBrowserContext(browser_context_))); 817 new ManagementEventRouter(Profile::FromBrowserContext(browser_context_)));
820 EventRouter::Get(browser_context_)->UnregisterObserver(this); 818 EventRouter::Get(browser_context_)->UnregisterObserver(this);
821 } 819 }
822 820
823 } // namespace extensions 821 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698