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

Side by Side Diff: chrome/browser/ui/hung_plugin_tab_helper.cc

Issue 2824363002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/ui (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 (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/ui/hung_plugin_tab_helper.h" 5 #include "chrome/browser/ui/hung_plugin_tab_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 base::Bind(&DumpRenderersInBlockingPool, 394 base::Bind(&DumpRenderersInBlockingPool,
395 base::Owned(renderer_handles.release()))); 395 base::Owned(renderer_handles.release())));
396 } 396 }
397 } 397 }
398 } 398 }
399 #endif 399 #endif
400 400
401 PluginStateMap::iterator found = hung_plugins_.find(child_id); 401 PluginStateMap::iterator found = hung_plugins_.find(child_id);
402 DCHECK(found != hung_plugins_.end()); 402 DCHECK(found != hung_plugins_.end());
403 403
404 content::BrowserThread::PostTask(content::BrowserThread::IO, 404 content::BrowserThread::PostTask(
405 FROM_HERE, 405 content::BrowserThread::IO, FROM_HERE,
406 base::Bind(&KillPluginOnIOThread, child_id)); 406 base::BindOnce(&KillPluginOnIOThread, child_id));
407 CloseBar(found->second.get()); 407 CloseBar(found->second.get());
408 } 408 }
409 409
410 void HungPluginTabHelper::OnReshowTimer(int child_id) { 410 void HungPluginTabHelper::OnReshowTimer(int child_id) {
411 // The timer should have been cancelled if the record isn't in our map 411 // The timer should have been cancelled if the record isn't in our map
412 // anymore. 412 // anymore.
413 PluginStateMap::iterator found = hung_plugins_.find(child_id); 413 PluginStateMap::iterator found = hung_plugins_.find(child_id);
414 DCHECK(found != hung_plugins_.end()); 414 DCHECK(found != hung_plugins_.end());
415 DCHECK(!found->second->infobar); 415 DCHECK(!found->second->infobar);
416 ShowBar(child_id, found->second.get()); 416 ShowBar(child_id, found->second.get());
(...skipping 11 matching lines...) Expand all
428 } 428 }
429 429
430 void HungPluginTabHelper::CloseBar(PluginState* state) { 430 void HungPluginTabHelper::CloseBar(PluginState* state) {
431 InfoBarService* infobar_service = 431 InfoBarService* infobar_service =
432 InfoBarService::FromWebContents(web_contents()); 432 InfoBarService::FromWebContents(web_contents());
433 if (infobar_service && state->infobar) { 433 if (infobar_service && state->infobar) {
434 infobar_service->RemoveInfoBar(state->infobar); 434 infobar_service->RemoveInfoBar(state->infobar);
435 state->infobar = NULL; 435 state->infobar = NULL;
436 } 436 }
437 } 437 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fast_unload_controller.cc ('k') | chrome/browser/ui/libgtkui/app_indicator_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698