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

Side by Side Diff: net/disk_cache/backend_impl.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « net/curvecp/messenger.cc ('k') | net/disk_cache/disk_cache_test_util.cc » ('j') | 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/disk_cache/backend_impl.h" 5 #include "net/disk_cache/backend_impl.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 466
467 num_refs_ = num_pending_io_ = max_refs_ = 0; 467 num_refs_ = num_pending_io_ = max_refs_ = 0;
468 entry_count_ = byte_count_ = 0; 468 entry_count_ = byte_count_ = 0;
469 469
470 if (!restarted_) { 470 if (!restarted_) {
471 buffer_bytes_ = 0; 471 buffer_bytes_ = 0;
472 trace_object_ = TraceObject::GetTraceObject(); 472 trace_object_ = TraceObject::GetTraceObject();
473 // Create a recurrent timer of 30 secs. 473 // Create a recurrent timer of 30 secs.
474 int timer_delay = unit_test_ ? 1000 : 30000; 474 int timer_delay = unit_test_ ? 1000 : 30000;
475 timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this, 475 timer_.Start(TimeDelta::FromMilliseconds(timer_delay), this,
476 &BackendImpl::OnStatsTimer); 476 &BackendImpl::OnStatsTimer);
477 } 477 }
478 478
479 init_ = true; 479 init_ = true;
480 480
481 if (data_->header.experiment != NO_EXPERIMENT && 481 if (data_->header.experiment != NO_EXPERIMENT &&
482 cache_type_ != net::DISK_CACHE) { 482 cache_type_ != net::DISK_CACHE) {
483 // No experiment for other caches. 483 // No experiment for other caches.
484 return net::ERR_FAILED; 484 return net::ERR_FAILED;
485 } 485 }
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 if (total_memory > kMaxBuffersSize || total_memory <= 0) 2120 if (total_memory > kMaxBuffersSize || total_memory <= 0)
2121 total_memory = kMaxBuffersSize; 2121 total_memory = kMaxBuffersSize;
2122 2122
2123 done = true; 2123 done = true;
2124 } 2124 }
2125 2125
2126 return static_cast<int>(total_memory); 2126 return static_cast<int>(total_memory);
2127 } 2127 }
2128 2128
2129 } // namespace disk_cache 2129 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/curvecp/messenger.cc ('k') | net/disk_cache/disk_cache_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698