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

Unified Diff: chrome/browser/spellchecker/misspelling.cc

Issue 1665023002: Cheer up spell-checking code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/misspelling.cc
diff --git a/chrome/browser/spellchecker/misspelling.cc b/chrome/browser/spellchecker/misspelling.cc
index 86deb0d0674f0415b55867db078c9b8e111e9702..5f13a252be4771704f74cee975c9336acab5188b 100644
--- a/chrome/browser/spellchecker/misspelling.cc
+++ b/chrome/browser/spellchecker/misspelling.cc
@@ -48,8 +48,9 @@ Misspelling::Misspelling(const base::string16& context,
Misspelling::~Misspelling() {}
-base::DictionaryValue* SerializeMisspelling(const Misspelling& misspelling) {
- base::DictionaryValue* result = new base::DictionaryValue;
+scoped_ptr<base::DictionaryValue> SerializeMisspelling(
+ const Misspelling& misspelling) {
+ scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue);
result->SetString(
"timestamp",
base::Int64ToString(static_cast<long>(misspelling.timestamp.ToJsTime())));

Powered by Google App Engine
This is Rietveld 408576698