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: content/child/v8_value_converter_impl.cc

Issue 2931393003: [Content] Update V8ValueConverter::create to return a std::unique_ptr (Closed)
Patch Set: rebase Created 3 years, 6 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 (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 #include "content/child/v8_value_converter_impl.h" 5 #include "content/child/v8_value_converter_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 private: 169 private:
170 typedef std::multimap<int, v8::Local<v8::Object> > HashToHandleMap; 170 typedef std::multimap<int, v8::Local<v8::Object> > HashToHandleMap;
171 V8ValueConverterImpl::FromV8ValueState* state_; 171 V8ValueConverterImpl::FromV8ValueState* state_;
172 v8::Local<v8::Object> value_; 172 v8::Local<v8::Object> value_;
173 bool is_valid_; 173 bool is_valid_;
174 174
175 DISALLOW_COPY_AND_ASSIGN(ScopedUniquenessGuard); 175 DISALLOW_COPY_AND_ASSIGN(ScopedUniquenessGuard);
176 }; 176 };
177 177
178 V8ValueConverter* V8ValueConverter::create() { 178 std::unique_ptr<V8ValueConverter> V8ValueConverter::Create() {
179 return new V8ValueConverterImpl(); 179 return base::MakeUnique<V8ValueConverterImpl>();
180 } 180 }
181 181
182 V8ValueConverterImpl::V8ValueConverterImpl() 182 V8ValueConverterImpl::V8ValueConverterImpl()
183 : date_allowed_(false), 183 : date_allowed_(false),
184 reg_exp_allowed_(false), 184 reg_exp_allowed_(false),
185 function_allowed_(false), 185 function_allowed_(false),
186 strip_null_from_objects_(false), 186 strip_null_from_objects_(false),
187 convert_negative_zero_to_int_(false), 187 convert_negative_zero_to_int_(false),
188 avoid_identity_hash_for_testing_(false), 188 avoid_identity_hash_for_testing_(false),
189 strategy_(NULL) {} 189 strategy_(NULL) {}
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 continue; 616 continue;
617 617
618 result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()), 618 result->SetWithoutPathExpansion(std::string(*name_utf8, name_utf8.length()),
619 std::move(child)); 619 std::move(child));
620 } 620 }
621 621
622 return std::move(result); 622 return std::move(result);
623 } 623 }
624 624
625 } // namespace content 625 } // namespace content
OLDNEW
« no previous file with comments | « components/plugins/renderer/loadable_plugin_placeholder.cc ('k') | content/public/child/v8_value_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698