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

Unified Diff: ui/app_list/search/history_data_store.cc

Issue 855023003: Add presubmit check for scoped_ptr usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 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
« no previous file with comments | « ui/app_list/search/dictionary_data_store.cc ('k') | ui/app_list/test/test_search_result.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search/history_data_store.cc
diff --git a/ui/app_list/search/history_data_store.cc b/ui/app_list/search/history_data_store.cc
index 996adc44e78a04b1c95b792d9976b7d13f837ce1..533822037bdce8dec9803dd4ef04cefe6359e982 100644
--- a/ui/app_list/search/history_data_store.cc
+++ b/ui/app_list/search/history_data_store.cc
@@ -59,13 +59,13 @@ scoped_ptr<HistoryData::Associations> Parse(
std::string version;
if (!dict->GetStringWithoutPathExpansion(kKeyVersion, &version) ||
version != kCurrentVersion) {
- return scoped_ptr<HistoryData::Associations>();
+ return nullptr;
}
const base::DictionaryValue* assoc_dict = NULL;
if (!dict->GetDictionaryWithoutPathExpansion(kKeyAssociations, &assoc_dict) ||
!assoc_dict) {
- return scoped_ptr<HistoryData::Associations>();
+ return nullptr;
}
scoped_ptr<HistoryData::Associations> data(new HistoryData::Associations);
@@ -212,7 +212,7 @@ void HistoryDataStore::OnDictionaryLoadedCallback(
OnLoadedCallback callback,
scoped_ptr<base::DictionaryValue> dict) {
if (!dict) {
- callback.Run(scoped_ptr<HistoryData::Associations>());
+ callback.Run(nullptr);
} else {
callback.Run(Parse(dict.Pass()).Pass());
}
« no previous file with comments | « ui/app_list/search/dictionary_data_store.cc ('k') | ui/app_list/test/test_search_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698