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

Side by Side Diff: net/base/io_buffer.h

Issue 465463002: Initial implementation of ServiceWorkerCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cache2
Patch Set: Default backend 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
« no previous file with comments | « content/content_tests.gypi ('k') | net/base/io_buffer.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_BASE_IO_BUFFER_H_ 5 #ifndef NET_BASE_IO_BUFFER_H_
6 #define NET_BASE_IO_BUFFER_H_ 6 #define NET_BASE_IO_BUFFER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 virtual ~IOBufferWithSize(); 107 virtual ~IOBufferWithSize();
108 108
109 int size_; 109 int size_;
110 }; 110 };
111 111
112 // This is a read only IOBuffer. The data is stored in a string and 112 // This is a read only IOBuffer. The data is stored in a string and
113 // the IOBuffer interface does not provide a proper way to modify it. 113 // the IOBuffer interface does not provide a proper way to modify it.
114 class NET_EXPORT StringIOBuffer : public IOBuffer { 114 class NET_EXPORT StringIOBuffer : public IOBuffer {
115 public: 115 public:
116 explicit StringIOBuffer(const std::string& s); 116 explicit StringIOBuffer(const std::string& s);
117 explicit StringIOBuffer(scoped_ptr<std::string> s);
117 118
118 int size() const { return static_cast<int>(string_data_.size()); } 119 int size() const { return static_cast<int>(string_data_.size()); }
119 120
120 private: 121 private:
121 virtual ~StringIOBuffer(); 122 virtual ~StringIOBuffer();
122 123
123 std::string string_data_; 124 std::string string_data_;
124 }; 125 };
125 126
126 // This version wraps an existing IOBuffer and provides convenient functions 127 // This version wraps an existing IOBuffer and provides convenient functions
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 public: 236 public:
236 explicit WrappedIOBuffer(const char* data); 237 explicit WrappedIOBuffer(const char* data);
237 238
238 protected: 239 protected:
239 virtual ~WrappedIOBuffer(); 240 virtual ~WrappedIOBuffer();
240 }; 241 };
241 242
242 } // namespace net 243 } // namespace net
243 244
244 #endif // NET_BASE_IO_BUFFER_H_ 245 #endif // NET_BASE_IO_BUFFER_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | net/base/io_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698