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

Unified Diff: cloud_print/service/win/chrome_launcher.cc

Issue 1558633002: Cleanup: Remove double semicolons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert CP code to a while loop, fix nit Created 5 years 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: cloud_print/service/win/chrome_launcher.cc
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index 8966a200cf5cd6097eb28902731d411c1e662004..5c9013aa9a098bf5d73a89cc32e1a15dcff36a53 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -13,7 +13,6 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/process/process.h"
-#include "base/process/process.h"
#include "base/values.h"
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
@@ -201,8 +200,8 @@ void ChromeLauncher::Run() {
const base::TimeDelta default_time_out = base::TimeDelta::FromSeconds(1);
const base::TimeDelta max_time_out = base::TimeDelta::FromHours(1);
- for (base::TimeDelta time_out = default_time_out;;
tfarina 2015/12/30 20:32:59 really? Maybe just add a space after the first ';'
Lei Zhang 2015/12/30 20:59:59 Meh. For-loops without a condition are harder to r
- time_out = std::min(time_out * 2, max_time_out)) {
+ base::TimeDelta time_out = default_time_out;
+ while (1) {
base::FilePath chrome_path =
chrome_launcher_support::GetAnyChromePath(false /* is_sxs */);
@@ -254,6 +253,8 @@ void ChromeLauncher::Run() {
}
if (stop_event_.TimedWait(time_out))
break;
+
+ time_out = std::min(time_out * 2, max_time_out);
}
}

Powered by Google App Engine
This is Rietveld 408576698