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

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

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (Closed)
Patch Set: Created 3 years, 8 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 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); 348 Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
349 ToolbarActionsBar* toolbar_actions_bar = 349 ToolbarActionsBar* toolbar_actions_bar =
350 browser ? browser->window()->GetToolbarActionsBar() : nullptr; 350 browser ? browser->window()->GetToolbarActionsBar() : nullptr;
351 if (toolbar_actions_bar) { 351 if (toolbar_actions_bar) {
352 auto callback = 352 auto callback =
353 base::Bind(&ExtensionActionRunner::OnBlockedActionBubbleClosed, 353 base::Bind(&ExtensionActionRunner::OnBlockedActionBubbleClosed,
354 weak_factory_.GetWeakPtr(), extension->id()); 354 weak_factory_.GetWeakPtr(), extension->id());
355 if (default_bubble_close_action_for_testing_) { 355 if (default_bubble_close_action_for_testing_) {
356 base::ThreadTaskRunnerHandle::Get()->PostTask( 356 base::ThreadTaskRunnerHandle::Get()->PostTask(
357 FROM_HERE, 357 FROM_HERE,
358 base::Bind(callback, *default_bubble_close_action_for_testing_)); 358 base::BindOnce(callback, *default_bubble_close_action_for_testing_));
359 } else { 359 } else {
360 toolbar_actions_bar->ShowToolbarActionBubble( 360 toolbar_actions_bar->ShowToolbarActionBubble(
361 base::MakeUnique<BlockedActionBubbleDelegate>(callback, 361 base::MakeUnique<BlockedActionBubbleDelegate>(callback,
362 extension->id())); 362 extension->id()));
363 } 363 }
364 } 364 }
365 } 365 }
366 366
367 void ExtensionActionRunner::OnBlockedActionBubbleClosed( 367 void ExtensionActionRunner::OnBlockedActionBubbleClosed(
368 const std::string& extension_id, 368 const std::string& extension_id,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 UnloadedExtensionInfo::Reason reason) { 422 UnloadedExtensionInfo::Reason 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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/event_router_forwarder_unittest.cc ('k') | chrome/browser/extensions/extension_bindings_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698