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

Side by Side Diff: content/browser/fileapi/mock_url_request_delegate.cc

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/fileapi/mock_url_request_delegate.h" 5 #include "content/browser/fileapi/mock_url_request_delegate.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 if (bytes_read) { 59 if (bytes_read) {
60 response_data_.append(io_buffer_->data(), 60 response_data_.append(io_buffer_->data(),
61 static_cast<size_t>(bytes_read)); 61 static_cast<size_t>(bytes_read));
62 ReadSome(request); 62 ReadSome(request);
63 } else { 63 } else {
64 RequestComplete(); 64 RequestComplete();
65 } 65 }
66 } 66 }
67 67
68 void MockURLRequestDelegate::RequestComplete() { 68 void MockURLRequestDelegate::RequestComplete() {
69 base::MessageLoop::current()->Quit(); 69 base::MessageLoop::current()->QuitWhenIdle();
70 } 70 }
71 71
72 } // namespace 72 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698