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

Side by Side Diff: components/memory_pressure/filtered_memory_pressure_calculator.cc

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month 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
« no previous file with comments | « components/invalidation/impl/mock_ack_handler.cc ('k') | components/nacl/renderer/histogram.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/memory_pressure/filtered_memory_pressure_calculator.h" 5 #include "components/memory_pressure/filtered_memory_pressure_calculator.h"
6 6
7 #include <algorithm>
7 #include "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
8 9
9 namespace memory_pressure { 10 namespace memory_pressure {
10 11
11 #if defined(MEMORY_PRESSURE_IS_POLLING) 12 #if defined(MEMORY_PRESSURE_IS_POLLING)
12 13
13 // 100ms (10Hz) allows a relatively fast respsonse time for rapidly increasing 14 // 100ms (10Hz) allows a relatively fast respsonse time for rapidly increasing
14 // memory usage, but limits the amount of work done in the calculator. 15 // memory usage, but limits the amount of work done in the calculator.
15 const int FilteredMemoryPressureCalculator::kMinimumTimeBetweenSamplesMs = 100; 16 const int FilteredMemoryPressureCalculator::kMinimumTimeBetweenSamplesMs = 100;
16 17
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 cooldown_start_time_ = now; 90 cooldown_start_time_ = now;
90 cooldown_high_tide_ = level; 91 cooldown_high_tide_ = level;
91 } 92 }
92 93
93 return current_pressure_level_; 94 return current_pressure_level_;
94 } 95 }
95 96
96 #endif // defined(MEMORY_PRESSURE_IS_POLLING) 97 #endif // defined(MEMORY_PRESSURE_IS_POLLING)
97 98
98 } // namespace memory_pressure 99 } // namespace memory_pressure
OLDNEW
« no previous file with comments | « components/invalidation/impl/mock_ack_handler.cc ('k') | components/nacl/renderer/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698