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

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

Issue 9703053: Remove old Sleep and PostDelayedTask interfaces that use int ms instead of TimeDelta. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 7 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: cloud_print/service/win/service_state.cc
diff --git a/cloud_print/service/win/service_state.cc b/cloud_print/service/win/service_state.cc
index 1478f2b7d23da02e10a0fc1e1be742ac578e3225..5c1453f924fee948c0d628c382f76da663c8f6bf 100644
--- a/cloud_print/service/win/service_state.cc
+++ b/cloud_print/service/win/service_state.cc
@@ -164,12 +164,12 @@ std::string ServiceState::LoginToGoogle(const std::string& service,
ServiceStateURLRequestDelegate fetcher_delegate;
GURL url(kClientLoginUrl);
- std::string post_body;
- post_body += "accountType=GOOGLE";
- post_body += "&Email=" + net::EscapeUrlEncodedData(email, true);
- post_body += "&Passwd=" + net::EscapeUrlEncodedData(password, true);
- post_body += "&source=" + net::EscapeUrlEncodedData("CP-Service", true);
- post_body += "&service=" + net::EscapeUrlEncodedData(service, true);
+ std::string post_body;
+ post_body += "accountType=GOOGLE";
+ post_body += "&Email=" + net::EscapeUrlEncodedData(email, true);
+ post_body += "&Passwd=" + net::EscapeUrlEncodedData(password, true);
+ post_body += "&source=" + net::EscapeUrlEncodedData("CP-Service", true);
+ post_body += "&service=" + net::EscapeUrlEncodedData(service, true);
net::URLRequest request(url, &fetcher_delegate);
@@ -180,8 +180,9 @@ std::string ServiceState::LoginToGoogle(const std::string& service,
request.set_method("POST");
request.Start();
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, MessageLoop::QuitClosure(), kRequestTimeoutMs);
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
+ MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(kRequestTimeoutMs));
MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698