OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_action_runner.h" | 5 #include "chrome/browser/extensions/extension_action_runner.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 permitted_extensions_.clear(); | 412 permitted_extensions_.clear(); |
413 pending_scripts_.clear(); | 413 pending_scripts_.clear(); |
414 web_request_blocked_.clear(); | 414 web_request_blocked_.clear(); |
415 was_used_on_page_ = false; | 415 was_used_on_page_ = false; |
416 weak_factory_.InvalidateWeakPtrs(); | 416 weak_factory_.InvalidateWeakPtrs(); |
417 } | 417 } |
418 | 418 |
419 void ExtensionActionRunner::OnExtensionUnloaded( | 419 void ExtensionActionRunner::OnExtensionUnloaded( |
420 content::BrowserContext* browser_context, | 420 content::BrowserContext* browser_context, |
421 const Extension* extension, | 421 const Extension* extension, |
422 UnloadedExtensionInfo::Reason reason) { | 422 UnloadedExtensionReason reason) { |
423 PendingScriptMap::iterator iter = pending_scripts_.find(extension->id()); | 423 PendingScriptMap::iterator iter = pending_scripts_.find(extension->id()); |
424 if (iter != pending_scripts_.end()) { | 424 if (iter != pending_scripts_.end()) { |
425 pending_scripts_.erase(iter); | 425 pending_scripts_.erase(iter); |
426 ExtensionActionAPI::Get(browser_context_) | 426 ExtensionActionAPI::Get(browser_context_) |
427 ->NotifyPageActionsChanged(web_contents()); | 427 ->NotifyPageActionsChanged(web_contents()); |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 } // namespace extensions | 431 } // namespace extensions |
OLD | NEW |