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

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

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 | « no previous file | Source/platform/SharedBuffer.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 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Calling this function will force internal segmented buffers to be merged 54 // Calling this function will force internal segmented buffers to be merged
55 // into a flat buffer. Use getSomeData() whenever possible for better 55 // into a flat buffer. Use getSomeData() whenever possible for better
56 // performance. 56 // performance.
57 const char* data() const; 57 const char* data() const;
58 58
59 unsigned size() const; 59 unsigned size() const;
60 60
61 bool isEmpty() const { return !size(); } 61 bool isEmpty() const { return !size(); }
62 62
63 void append(SharedBuffer*); 63 void append(PassRefPtr<SharedBuffer>);
64 void append(const char*, unsigned); 64 void append(const char*, unsigned);
65 void append(const Vector<char>&); 65 void append(const Vector<char>&);
66 66
67 void clear(); 67 void clear();
68 68
69 PassRefPtr<SharedBuffer> copy() const; 69 PassRefPtr<SharedBuffer> copy() const;
70 70
71 // Return the number of consecutive bytes after "position". "data" 71 // Return the number of consecutive bytes after "position". "data"
72 // points to the first byte. 72 // points to the first byte.
73 // Return 0 when no more data left. 73 // Return 0 when no more data left.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void mergeSegmentsIntoBuffer() const; 112 void mergeSegmentsIntoBuffer() const;
113 113
114 unsigned m_size; 114 unsigned m_size;
115 mutable PurgeableVector m_buffer; 115 mutable PurgeableVector m_buffer;
116 mutable Vector<char*> m_segments; 116 mutable Vector<char*> m_segments;
117 }; 117 };
118 118
119 } // namespace WebCore 119 } // namespace WebCore
120 120
121 #endif // SharedBuffer_h 121 #endif // SharedBuffer_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/SharedBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698