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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « extensions/common/value_builder.cc ('k') | extensions/renderer/argument_spec.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 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 22 matching lines...) Expand all
33 name = v8::String::Concat(name, v8::Local<v8::String>::Cast(fname)); 33 name = v8::String::Concat(name, v8::Local<v8::String>::Cast(fname));
34 name = v8::String::Concat(name, v8::String::NewFromUtf8(isolate, "()")); 34 name = v8::String::Concat(name, v8::String::NewFromUtf8(isolate, "()"));
35 } 35 }
36 } else { 36 } else {
37 name = v8::String::Concat(name, object->GetConstructorName()); 37 name = v8::String::Concat(name, object->GetConstructorName());
38 } 38 }
39 name = v8::String::Concat(name, v8::String::NewFromUtf8(isolate, "]")); 39 name = v8::String::Concat(name, v8::String::NewFromUtf8(isolate, "]"));
40 40
41 if (try_catch.HasCaught()) { 41 if (try_catch.HasCaught()) {
42 return std::unique_ptr<base::Value>( 42 return std::unique_ptr<base::Value>(
43 new base::StringValue("[JS Execution Exception]")); 43 new base::Value("[JS Execution Exception]"));
44 } 44 }
45 45
46 return std::unique_ptr<base::Value>( 46 return std::unique_ptr<base::Value>(
47 new base::StringValue(std::string(*v8::String::Utf8Value(name)))); 47 new base::Value(std::string(*v8::String::Utf8Value(name))));
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,
(...skipping 15 matching lines...) Expand all
73 v8::Local<v8::Object> value, 73 v8::Local<v8::Object> value,
74 std::unique_ptr<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 *out = SummarizeV8Value(isolate, value); 77 *out = SummarizeV8Value(isolate, value);
78 78
79 return true; 79 return true;
80 } 80 }
81 81
82 } // namespace extensions 82 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/value_builder.cc ('k') | extensions/renderer/argument_spec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698