| OLD | NEW |
| 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/extension_disabled_ui.h" | 5 #include "chrome/browser/extensions/extension_disabled_ui.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 registry_observer_.RemoveAll(); | 449 registry_observer_.RemoveAll(); |
| 450 } | 450 } |
| 451 | 451 |
| 452 void ExtensionDisabledGlobalError::RemoveGlobalError() { | 452 void ExtensionDisabledGlobalError::RemoveGlobalError() { |
| 453 GlobalErrorServiceFactory::GetForProfile(service_->profile()) | 453 GlobalErrorServiceFactory::GetForProfile(service_->profile()) |
| 454 ->RemoveGlobalError(this); | 454 ->RemoveGlobalError(this); |
| 455 registrar_.RemoveAll(); | 455 registrar_.RemoveAll(); |
| 456 registry_observer_.RemoveAll(); | 456 registry_observer_.RemoveAll(); |
| 457 // Delete this object after any running tasks, so that the extension dialog | 457 // Delete this object after any running tasks, so that the extension dialog |
| 458 // still has it as a delegate to finish the current tasks. | 458 // still has it as a delegate to finish the current tasks. |
| 459 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 459 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
| 460 } | 460 } |
| 461 | 461 |
| 462 // Globals -------------------------------------------------------------------- | 462 // Globals -------------------------------------------------------------------- |
| 463 | 463 |
| 464 namespace extensions { | 464 namespace extensions { |
| 465 | 465 |
| 466 void AddExtensionDisabledErrorWithIcon(base::WeakPtr<ExtensionService> service, | 466 void AddExtensionDisabledErrorWithIcon(base::WeakPtr<ExtensionService> service, |
| 467 const std::string& extension_id, | 467 const std::string& extension_id, |
| 468 bool is_remote_install, | 468 bool is_remote_install, |
| 469 const gfx::Image& icon) { | 469 const gfx::Image& icon) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 497 content::WebContents* web_contents, | 497 content::WebContents* web_contents, |
| 498 const Extension* extension) { | 498 const Extension* extension) { |
| 499 std::unique_ptr<ExtensionInstallPrompt> install_ui( | 499 std::unique_ptr<ExtensionInstallPrompt> install_ui( |
| 500 new ExtensionInstallPrompt(web_contents)); | 500 new ExtensionInstallPrompt(web_contents)); |
| 501 // This object manages its own lifetime. | 501 // This object manages its own lifetime. |
| 502 new ExtensionDisabledDialogDelegate(service, std::move(install_ui), | 502 new ExtensionDisabledDialogDelegate(service, std::move(install_ui), |
| 503 extension); | 503 extension); |
| 504 } | 504 } |
| 505 | 505 |
| 506 } // namespace extensions | 506 } // namespace extensions |
| OLD | NEW |