summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/service_state.cc
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 19:56:17 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 19:56:17 +0000
commitef855c25d0f65b9f6ef79493260169ed81e1efbb (patch)
tree1f9e370407d1cd3d75cd5ff11638f029a49b4cf3 /cloud_print/service/service_state.cc
parent9fa73739c47280860c0e5a44af62885bee391e12 (diff)
downloadchromium_src-ef855c25d0f65b9f6ef79493260169ed81e1efbb.zip
chromium_src-ef855c25d0f65b9f6ef79493260169ed81e1efbb.tar.gz
chromium_src-ef855c25d0f65b9f6ef79493260169ed81e1efbb.tar.bz2
cloud_print: Use base::MessageLoop.
BUG=236029 R=abodenha@chromium.org Review URL: https://chromiumcodereview.appspot.com/14522026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198513 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/service/service_state.cc')
-rw-r--r--cloud_print/service/service_state.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/service_state.cc
index 2bd4715..0c30be6 100644
--- a/cloud_print/service/service_state.cc
+++ b/cloud_print/service/service_state.cc
@@ -45,14 +45,14 @@ class ServiceStateURLRequestDelegate : public net::URLRequest::Delegate {
return;
}
request->Cancel();
- };
+ }
virtual void OnReadCompleted(net::URLRequest* request,
int bytes_read) OVERRIDE {
Read(request);
if (!request->status().is_io_pending())
- MessageLoop::current()->Quit();
- };
+ base::MessageLoop::current()->Quit();
+ }
const std::string& data() const {
return data_;
@@ -160,7 +160,7 @@ std::string ServiceState::ToString() {
std::string ServiceState::LoginToGoogle(const std::string& service,
const std::string& email,
const std::string& password) {
- MessageLoop loop(MessageLoop::TYPE_IO);
+ base::MessageLoop loop(base::MessageLoop::TYPE_IO);
net::URLRequestContextBuilder builder;
scoped_ptr<net::URLRequestContext> context(builder.Build());
@@ -190,11 +190,12 @@ std::string ServiceState::LoginToGoogle(const std::string& service,
request.set_method("POST");
request.Start();
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(),
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(kRequestTimeoutMs));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
const char kAuthStart[] = "Auth=";
std::vector<std::string> lines;