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

Side by Side Diff: url/url_canon.h

Issue 822713002: Update from https://crrev.com/309415 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 12 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
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 #ifndef URL_URL_CANON_H_ 5 #ifndef URL_URL_CANON_H_
6 #define URL_URL_CANON_H_ 6 #define URL_URL_CANON_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 public: 147 public:
148 RawCanonOutputT() : CanonOutputT<T>() { 148 RawCanonOutputT() : CanonOutputT<T>() {
149 this->buffer_ = fixed_buffer_; 149 this->buffer_ = fixed_buffer_;
150 this->buffer_len_ = fixed_capacity; 150 this->buffer_len_ = fixed_capacity;
151 } 151 }
152 virtual ~RawCanonOutputT() { 152 virtual ~RawCanonOutputT() {
153 if (this->buffer_ != fixed_buffer_) 153 if (this->buffer_ != fixed_buffer_)
154 delete[] this->buffer_; 154 delete[] this->buffer_;
155 } 155 }
156 156
157 virtual void Resize(int sz) { 157 void Resize(int sz) override {
158 T* new_buf = new T[sz]; 158 T* new_buf = new T[sz];
159 memcpy(new_buf, this->buffer_, 159 memcpy(new_buf, this->buffer_,
160 sizeof(T) * (this->cur_len_ < sz ? this->cur_len_ : sz)); 160 sizeof(T) * (this->cur_len_ < sz ? this->cur_len_ : sz));
161 if (this->buffer_ != fixed_buffer_) 161 if (this->buffer_ != fixed_buffer_)
162 delete[] this->buffer_; 162 delete[] this->buffer_;
163 this->buffer_ = new_buf; 163 this->buffer_ = new_buf;
164 this->buffer_len_ = sz; 164 this->buffer_len_ = sz;
165 } 165 }
166 166
167 protected: 167 protected:
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 bool base_is_file, 883 bool base_is_file,
884 const base::char16* relative_url, 884 const base::char16* relative_url,
885 const Component& relative_component, 885 const Component& relative_component,
886 CharsetConverter* query_converter, 886 CharsetConverter* query_converter,
887 CanonOutput* output, 887 CanonOutput* output,
888 Parsed* out_parsed); 888 Parsed* out_parsed);
889 889
890 } // namespace url 890 } // namespace url
891 891
892 #endif // URL_URL_CANON_H_ 892 #endif // URL_URL_CANON_H_
OLDNEW
« cc/scheduler/scheduler_state_machine.cc ('K') | « ui/gl/gl_surface_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698