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

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

Issue 543893002: Random fixes through Chrome for scoped_reftpr T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/history_data_store.cc
diff --git a/chrome/browser/ui/app_list/search/history_data_store.cc b/chrome/browser/ui/app_list/search/history_data_store.cc
index 4478036a25eaba40032b8538e61f4a8fef6bcee1..de4ce78bd0de9a26b0dbc5ac5f7a474b78829487 100644
--- a/chrome/browser/ui/app_list/search/history_data_store.cc
+++ b/chrome/browser/ui/app_list/search/history_data_store.cc
@@ -127,7 +127,7 @@ void HistoryDataStore::Init(base::DictionaryValue* cached_dict) {
void HistoryDataStore::Flush(
const DictionaryDataStore::OnFlushedCallback& on_flushed) {
- if (data_store_)
+ if (data_store_.get())
data_store_->Flush(on_flushed);
else
on_flushed.Run();
@@ -135,7 +135,7 @@ void HistoryDataStore::Flush(
void HistoryDataStore::Load(
const HistoryDataStore::OnLoadedCallback& on_loaded) {
- if (data_store_) {
+ if (data_store_.get()) {
data_store_->Load(base::Bind(&HistoryDataStore::OnDictionaryLoadedCallback,
this,
on_loaded));
@@ -150,7 +150,7 @@ void HistoryDataStore::SetPrimary(const std::string& query,
base::DictionaryValue* entry_dict = GetEntryDict(query);
entry_dict->SetWithoutPathExpansion(kKeyPrimary,
new base::StringValue(result));
- if (data_store_)
+ if (data_store_.get())
data_store_->ScheduleWrite();
}
@@ -163,7 +163,7 @@ void HistoryDataStore::SetSecondary(
base::DictionaryValue* entry_dict = GetEntryDict(query);
entry_dict->SetWithoutPathExpansion(kKeySecondary, results_list.release());
- if (data_store_)
+ if (data_store_.get())
data_store_->ScheduleWrite();
}
@@ -173,14 +173,14 @@ void HistoryDataStore::SetUpdateTime(const std::string& query,
entry_dict->SetWithoutPathExpansion(kKeyUpdateTime,
new base::StringValue(base::Int64ToString(
update_time.ToInternalValue())));
- if (data_store_)
+ if (data_store_.get())
data_store_->ScheduleWrite();
}
void HistoryDataStore::Delete(const std::string& query) {
base::DictionaryValue* assoc_dict = GetAssociationDict();
assoc_dict->RemoveWithoutPathExpansion(query, NULL);
- if (data_store_)
+ if (data_store_.get())
data_store_->ScheduleWrite();
}
« no previous file with comments | « chrome/browser/net/quota_policy_channel_id_store.cc ('k') | components/variations/variations_seed_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698