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

Side by Side Diff: Source/platform/SharedBuffer.cpp

Issue 364323002: Embed CSS/JS under Source/web/resources/ as GRD resources (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-treatnullas-emptystring
Patch Set: add missing include Created 6 years, 5 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
« no previous file with comments | « Source/platform/SharedBuffer.h ('k') | Source/web/ColorChooserPopupUIController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 { 225 {
226 return m_size; 226 return m_size;
227 } 227 }
228 228
229 const char* SharedBuffer::data() const 229 const char* SharedBuffer::data() const
230 { 230 {
231 mergeSegmentsIntoBuffer(); 231 mergeSegmentsIntoBuffer();
232 return m_buffer.data(); 232 return m_buffer.data();
233 } 233 }
234 234
235 void SharedBuffer::append(SharedBuffer* data) 235 void SharedBuffer::append(PassRefPtr<SharedBuffer> data)
236 { 236 {
237 const char* segment; 237 const char* segment;
238 size_t position = 0; 238 size_t position = 0;
239 while (size_t length = data->getSomeData(segment, position)) { 239 while (size_t length = data->getSomeData(segment, position)) {
240 append(segment, length); 240 append(segment, length);
241 position += length; 241 position += length;
242 } 242 }
243 } 243 }
244 244
245 void SharedBuffer::append(const char* data, unsigned length) 245 void SharedBuffer::append(const char* data, unsigned length)
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 mergeSegmentsIntoBuffer(); 414 mergeSegmentsIntoBuffer();
415 m_buffer.unlock(); 415 m_buffer.unlock();
416 } 416 }
417 417
418 bool SharedBuffer::isLocked() const 418 bool SharedBuffer::isLocked() const
419 { 419 {
420 return m_buffer.isLocked(); 420 return m_buffer.isLocked();
421 } 421 }
422 422
423 } // namespace WebCore 423 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/SharedBuffer.h ('k') | Source/web/ColorChooserPopupUIController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698