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

Side by Side Diff: content/renderer/shared_memory_seqlock_reader.cc

Issue 457933002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "shared_memory_seqlock_reader.h" 5 #include "shared_memory_seqlock_reader.h"
6 6
7 namespace content {
7 namespace internal { 8 namespace internal {
8 9
9 SharedMemorySeqLockReaderBase::SharedMemorySeqLockReaderBase() { } 10 SharedMemorySeqLockReaderBase::SharedMemorySeqLockReaderBase() { }
10 11
11 SharedMemorySeqLockReaderBase::~SharedMemorySeqLockReaderBase() { } 12 SharedMemorySeqLockReaderBase::~SharedMemorySeqLockReaderBase() { }
12 13
13 void* 14 void*
14 SharedMemorySeqLockReaderBase::InitializeSharedMemory( 15 SharedMemorySeqLockReaderBase::InitializeSharedMemory(
15 base::SharedMemoryHandle shared_memory_handle, size_t buffer_size) { 16 base::SharedMemoryHandle shared_memory_handle, size_t buffer_size) {
16 renderer_shared_memory_handle_ = shared_memory_handle; 17 renderer_shared_memory_handle_ = shared_memory_handle;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // buffer, and simply leave what was there before. 50 // buffer, and simply leave what was there before.
50 return false; 51 return false;
51 } 52 }
52 53
53 // New data was read successfully, copy it into the output buffer. 54 // New data was read successfully, copy it into the output buffer.
54 memcpy(final, temp, size); 55 memcpy(final, temp, size);
55 return true; 56 return true;
56 } 57 }
57 58
58 } // namespace internal 59 } // namespace internal
60 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/shared_memory_seqlock_reader.h ('k') | content/test/data/battery_status/battery_status_default_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698