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

Side by Side Diff: net/http/http_transaction_unittest.cc

Issue 7461106: Inform disk cache of WebKit memory cache hits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« net/http/http_cache.cc ('K') | « net/http/http_transaction_unittest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/http/http_transaction_unittest.h" 5 #include "net/http/http_transaction_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 net::LoadState MockNetworkTransaction::GetLoadState() const { 302 net::LoadState MockNetworkTransaction::GetLoadState() const {
303 if (data_cursor_) 303 if (data_cursor_)
304 return net::LOAD_STATE_READING_RESPONSE; 304 return net::LOAD_STATE_READING_RESPONSE;
305 return net::LOAD_STATE_IDLE; 305 return net::LOAD_STATE_IDLE;
306 } 306 }
307 307
308 uint64 MockNetworkTransaction::GetUploadProgress() const { 308 uint64 MockNetworkTransaction::GetUploadProgress() const {
309 return 0; 309 return 0;
310 } 310 }
311 311
312 void MockNetworkTransaction::UpdateRankForExternalCacheHit() {
313 }
314
312 void MockNetworkTransaction::CallbackLater(net::CompletionCallback* callback, 315 void MockNetworkTransaction::CallbackLater(net::CompletionCallback* callback,
313 int result) { 316 int result) {
314 MessageLoop::current()->PostTask(FROM_HERE, task_factory_.NewRunnableMethod( 317 MessageLoop::current()->PostTask(FROM_HERE, task_factory_.NewRunnableMethod(
315 &MockNetworkTransaction::RunCallback, callback, result)); 318 &MockNetworkTransaction::RunCallback, callback, result));
316 } 319 }
317 320
318 void MockNetworkTransaction::RunCallback(net::CompletionCallback* callback, 321 void MockNetworkTransaction::RunCallback(net::CompletionCallback* callback,
319 int result) { 322 int result) {
320 callback->Run(result); 323 callback->Run(result);
321 } 324 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (rv > 0) { 359 if (rv > 0) {
357 content.append(buf->data(), rv); 360 content.append(buf->data(), rv);
358 } else if (rv < 0) { 361 } else if (rv < 0) {
359 return rv; 362 return rv;
360 } 363 }
361 } while (rv > 0); 364 } while (rv > 0);
362 365
363 result->swap(content); 366 result->swap(content);
364 return net::OK; 367 return net::OK;
365 } 368 }
OLDNEW
« net/http/http_cache.cc ('K') | « net/http/http_transaction_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698