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

Side by Side Diff: extensions/renderer/activity_log_converter_strategy.cc

Issue 2014323002: Use std::unique_ptr<base::Value> in V8ValueConverter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android fixes Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/activity_log_converter_strategy.h" 5 #include "extensions/renderer/activity_log_converter_strategy.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 ActivityLogConverterStrategy::ActivityLogConverterStrategy() {} 52 ActivityLogConverterStrategy::ActivityLogConverterStrategy() {}
53 53
54 ActivityLogConverterStrategy::~ActivityLogConverterStrategy() {} 54 ActivityLogConverterStrategy::~ActivityLogConverterStrategy() {}
55 55
56 bool ActivityLogConverterStrategy::FromV8Object( 56 bool ActivityLogConverterStrategy::FromV8Object(
57 v8::Local<v8::Object> value, 57 v8::Local<v8::Object> value,
58 base::Value** out, 58 std::unique_ptr<base::Value>* out,
59 v8::Isolate* isolate, 59 v8::Isolate* isolate,
60 const FromV8ValueCallback& callback) const { 60 const FromV8ValueCallback& callback) const {
61 return FromV8Internal(value, out, isolate, callback); 61 return FromV8Internal(value, out, isolate, callback);
62 } 62 }
63 63
64 bool ActivityLogConverterStrategy::FromV8Array( 64 bool ActivityLogConverterStrategy::FromV8Array(
65 v8::Local<v8::Array> value, 65 v8::Local<v8::Array> value,
66 base::Value** out, 66 std::unique_ptr<base::Value>* out,
67 v8::Isolate* isolate, 67 v8::Isolate* isolate,
68 const FromV8ValueCallback& callback) const { 68 const FromV8ValueCallback& callback) const {
69 return FromV8Internal(value, out, isolate, callback); 69 return FromV8Internal(value, out, isolate, callback);
70 } 70 }
71 71
72 bool ActivityLogConverterStrategy::FromV8Internal( 72 bool ActivityLogConverterStrategy::FromV8Internal(
73 v8::Local<v8::Object> value, 73 v8::Local<v8::Object> value,
74 base::Value** out, 74 std::unique_ptr<base::Value>* out,
75 v8::Isolate* isolate, 75 v8::Isolate* isolate,
76 const FromV8ValueCallback& callback) const { 76 const FromV8ValueCallback& callback) const {
77 std::unique_ptr<base::Value> parsed_value; 77 *out = SummarizeV8Value(isolate, value);
78 parsed_value = SummarizeV8Value(isolate, value);
79 *out = parsed_value.release();
80 78
81 return true; 79 return true;
82 } 80 }
83 81
84 } // namespace extensions 82 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/activity_log_converter_strategy.h ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698