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

Side by Side Diff: base/memory/shared_memory_win.cc

Issue 15735027: Use a direct include of utf_string_conversions.h in android_webview/, apps/, ash/, base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | « base/memory/shared_memory_posix.cc ('k') | base/metrics/field_trial.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 "base/memory/shared_memory.h" 5 #include "base/memory/shared_memory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 9
10 namespace { 10 namespace {
11 11
12 // Returns the length of the memory section starting at the supplied address. 12 // Returns the length of the memory section starting at the supplied address.
13 size_t GetMemorySectionSize(void* address) { 13 size_t GetMemorySectionSize(void* address) {
14 MEMORY_BASIC_INFORMATION memory_info; 14 MEMORY_BASIC_INFORMATION memory_info;
15 if (!::VirtualQuery(address, &memory_info, sizeof(memory_info))) 15 if (!::VirtualQuery(address, &memory_info, sizeof(memory_info)))
16 return 0; 16 return 0;
17 return memory_info.RegionSize - (static_cast<char*>(address) - 17 return memory_info.RegionSize - (static_cast<char*>(address) -
18 static_cast<char*>(memory_info.AllocationBase)); 18 static_cast<char*>(memory_info.AllocationBase));
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 void SharedMemory::Unlock() { 251 void SharedMemory::Unlock() {
252 DCHECK(lock_ != NULL); 252 DCHECK(lock_ != NULL);
253 ReleaseMutex(lock_); 253 ReleaseMutex(lock_);
254 } 254 }
255 255
256 SharedMemoryHandle SharedMemory::handle() const { 256 SharedMemoryHandle SharedMemory::handle() const {
257 return mapped_file_; 257 return mapped_file_;
258 } 258 }
259 259
260 } // namespace base 260 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/shared_memory_posix.cc ('k') | base/metrics/field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698