OLD | NEW |
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 #include "chrome/renderer/extensions/activity_log_converter_strategy.h" | 5 #include "chrome/renderer/extensions/activity_log_converter_strategy.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/common/extensions/ad_injection_constants.h" | 9 #include "chrome/common/extensions/ad_injection_constants.h" |
10 #include "v8/include/v8.h" | 10 #include "v8/include/v8.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 | 165 |
166 bool ActivityLogConverterStrategy::FromV8Array( | 166 bool ActivityLogConverterStrategy::FromV8Array( |
167 v8::Handle<v8::Array> value, | 167 v8::Handle<v8::Array> value, |
168 base::Value** out, | 168 base::Value** out, |
169 v8::Isolate* isolate, | 169 v8::Isolate* isolate, |
170 const FromV8ValueCallback& callback) const { | 170 const FromV8ValueCallback& callback) const { |
171 return FromV8Internal(value, out, isolate, callback); | 171 return FromV8Internal(value, out, isolate, callback); |
172 } | 172 } |
173 | 173 |
| 174 bool ActivityLogConverterStrategy::FromV8ArrayBuffer( |
| 175 v8::Handle<v8::Object> value, |
| 176 base::Value** out) const { |
| 177 return false; |
| 178 } |
| 179 |
| 180 bool ActivityLogConverterStrategy::FromV8Number(v8::Handle<v8::Number> value, |
| 181 base::Value** out) const { |
| 182 return false; |
| 183 } |
| 184 |
| 185 bool ActivityLogConverterStrategy::FromV8Undefined(base::Value** out) const { |
| 186 return false; |
| 187 } |
| 188 |
174 bool ActivityLogConverterStrategy::FromV8Internal( | 189 bool ActivityLogConverterStrategy::FromV8Internal( |
175 v8::Handle<v8::Object> value, | 190 v8::Handle<v8::Object> value, |
176 base::Value** out, | 191 base::Value** out, |
177 v8::Isolate* isolate, | 192 v8::Isolate* isolate, |
178 const FromV8ValueCallback& callback) const { | 193 const FromV8ValueCallback& callback) const { |
179 scoped_ptr<base::Value> parsed_value; | 194 scoped_ptr<base::Value> parsed_value; |
180 if (enable_detailed_parsing_) | 195 if (enable_detailed_parsing_) |
181 parsed_value = ParseV8Object(isolate, *value, callback); | 196 parsed_value = ParseV8Object(isolate, *value, callback); |
182 if (!parsed_value.get()) | 197 if (!parsed_value.get()) |
183 parsed_value = SummarizeV8Value(isolate, value); | 198 parsed_value = SummarizeV8Value(isolate, value); |
184 *out = parsed_value.release(); | 199 *out = parsed_value.release(); |
185 | 200 |
186 return true; | 201 return true; |
187 } | 202 } |
188 | 203 |
189 } // namespace extensions | 204 } // namespace extensions |
OLD | NEW |