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

Unified Diff: chrome/browser/ui/app_list/search/common/webservice_cache.cc

Issue 2820823005: Revert of Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: Created 3 years, 8 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/ui/app_list/search/common/webservice_cache.cc
diff --git a/chrome/browser/ui/app_list/search/common/webservice_cache.cc b/chrome/browser/ui/app_list/search/common/webservice_cache.cc
index b1f103c74454d90ac6dbd10bc59df22a5df2be45..40b116ac4613152145b96a6a2636ab3e119884f8 100644
--- a/chrome/browser/ui/app_list/search/common/webservice_cache.cc
+++ b/chrome/browser/ui/app_list/search/common/webservice_cache.cc
@@ -128,15 +128,15 @@
return true;
}
-std::unique_ptr<base::DictionaryValue> WebserviceCache::DictFromPayload(
+base::DictionaryValue* WebserviceCache::DictFromPayload(
const Payload& payload) {
- auto dict = base::MakeUnique<base::DictionaryValue>();
+ base::DictionaryValue* dict = new base::DictionaryValue();
dict->SetString(kKeyResultTime, base::Int64ToString(
payload.time.ToInternalValue()));
// The payload will still keep ownership of it's result dict, hence put a
// a copy of the result dictionary here. This dictionary will be owned by
// data_store_->cached_dict().
- dict->Set(kKeyResult, base::MakeUnique<base::Value>(*payload.result));
+ dict->Set(kKeyResult, payload.result->DeepCopy());
return dict;
}
« no previous file with comments | « chrome/browser/ui/app_list/search/common/webservice_cache.h ('k') | chrome/browser/ui/ash/chrome_launcher_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698