OLD | NEW |
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 Loading... |
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 |
OLD | NEW |