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

Side by Side Diff: content/common/host_discardable_shared_memory_manager.cc

Issue 862403005: Mechanical rename of tracing includes for /content [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/common/host_discardable_shared_memory_manager.h" 5 #include "content/common/host_discardable_shared_memory_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/debug/crash_logging.h" 10 #include "base/debug/crash_logging.h"
11 #include "base/debug/trace_event.h"
12 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
13 #include "base/numerics/safe_math.h" 12 #include "base/numerics/safe_math.h"
14 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/trace_event/trace_event.h"
15 15
16 namespace content { 16 namespace content {
17 namespace { 17 namespace {
18 18
19 base::LazyInstance<HostDiscardableSharedMemoryManager> 19 base::LazyInstance<HostDiscardableSharedMemoryManager>
20 g_discardable_shared_memory_manager = LAZY_INSTANCE_INITIALIZER; 20 g_discardable_shared_memory_manager = LAZY_INSTANCE_INITIALIZER;
21 21
22 const size_t kDefaultMemoryLimit = 512 * 1024 * 1024; 22 const size_t kDefaultMemoryLimit = 512 * 1024 * 1024;
23 23
24 const int kEnforceMemoryPolicyDelayMs = 1000; 24 const int kEnforceMemoryPolicyDelayMs = 1000;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 enforce_memory_policy_pending_ = true; 248 enforce_memory_policy_pending_ = true;
249 base::MessageLoop::current()->PostDelayedTask( 249 base::MessageLoop::current()->PostDelayedTask(
250 FROM_HERE, 250 FROM_HERE,
251 base::Bind(&HostDiscardableSharedMemoryManager::EnforceMemoryPolicy, 251 base::Bind(&HostDiscardableSharedMemoryManager::EnforceMemoryPolicy,
252 weak_ptr_factory_.GetWeakPtr()), 252 weak_ptr_factory_.GetWeakPtr()),
253 base::TimeDelta::FromMilliseconds(kEnforceMemoryPolicyDelayMs)); 253 base::TimeDelta::FromMilliseconds(kEnforceMemoryPolicyDelayMs));
254 } 254 }
255 255
256 } // namespace content 256 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | content/common/sandbox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698