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

Unified Diff: content/renderer/pepper/pepper_hung_plugin_filter.cc

Issue 225903006: PPAPI: Run clang_format.py on content/renderer/pepper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_hung_plugin_filter.cc
diff --git a/content/renderer/pepper/pepper_hung_plugin_filter.cc b/content/renderer/pepper/pepper_hung_plugin_filter.cc
index ba4af0e22bbeaca360f283eda6bc5cce9636770c..57fc4a6af94b7746193c6b5309c6ae7b23838620 100644
--- a/content/renderer/pepper/pepper_hung_plugin_filter.cc
+++ b/content/renderer/pepper/pepper_hung_plugin_filter.cc
@@ -35,8 +35,7 @@ PepperHungPluginFilter::PepperHungPluginFilter(
io_loop_(ChildProcess::current()->io_message_loop_proxy()),
pending_sync_message_count_(0),
hung_plugin_showing_(false),
- timer_task_pending_(false) {
-}
+ timer_task_pending_(false) {}
void PepperHungPluginFilter::BeginBlockOnSyncMessage() {
base::AutoLock lock(lock_);
@@ -56,8 +55,7 @@ void PepperHungPluginFilter::EndBlockOnSyncMessage() {
MayHaveBecomeUnhung();
}
-void PepperHungPluginFilter::OnFilterAdded(IPC::Channel* channel) {
-}
+void PepperHungPluginFilter::OnFilterAdded(IPC::Channel* channel) {}
void PepperHungPluginFilter::OnFilterRemoved() {
base::AutoLock lock(lock_);
@@ -85,7 +83,8 @@ void PepperHungPluginFilter::EnsureTimerScheduled() {
return;
timer_task_pending_ = true;
- io_loop_->PostDelayedTask(FROM_HERE,
+ io_loop_->PostDelayedTask(
+ FROM_HERE,
base::Bind(&PepperHungPluginFilter::OnHangTimer, this),
base::TimeDelta::FromSeconds(kHungThresholdSec));
}
@@ -107,12 +106,13 @@ base::TimeTicks PepperHungPluginFilter::GetHungTime() const {
DCHECK(!last_message_received_.is_null());
// Always considered hung at the hard threshold.
- base::TimeTicks hard_time = began_blocking_time_ +
+ base::TimeTicks hard_time =
+ began_blocking_time_ +
base::TimeDelta::FromSeconds(kBlockedHardThresholdSec);
// Hung after a soft threshold from last message of any sort.
- base::TimeTicks soft_time = last_message_received_ +
- base::TimeDelta::FromSeconds(kHungThresholdSec);
+ base::TimeTicks soft_time =
+ last_message_received_ + base::TimeDelta::FromSeconds(kHungThresholdSec);
return std::min(soft_time, hard_time);
}
@@ -140,7 +140,8 @@ void PepperHungPluginFilter::OnHangTimer() {
// would not have scheduled one (we only have one out-standing timer at
// a time).
timer_task_pending_ = true;
- io_loop_->PostDelayedTask(FROM_HERE,
+ io_loop_->PostDelayedTask(
+ FROM_HERE,
base::Bind(&PepperHungPluginFilter::OnHangTimer, this),
delay);
return;

Powered by Google App Engine
This is Rietveld 408576698