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

Unified Diff: chrome/browser/history/history.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 2 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 | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history.cc
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index 0b3375d625c71ec2db12b93a8362a65ab3daa126..2a5982691925bdd6c063e83a9a1c26a70b069fb2 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -193,7 +193,7 @@ bool HistoryService::BackendLoaded() {
}
void HistoryService::UnloadBackend() {
- if (!history_backend_)
+ if (!history_backend_.get())
return; // Already unloaded.
// Get rid of the in-memory backend.
@@ -842,7 +842,7 @@ bool HistoryService::CanAddURL(const GURL& url) {
void HistoryService::SetInMemoryBackend(int backend_id,
history::InMemoryHistoryBackend* mem_backend) {
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
VLOG(1) << "Message from obsolete backend";
// Cleaning up the memory backend.
delete mem_backend;
@@ -857,7 +857,7 @@ void HistoryService::SetInMemoryBackend(int backend_id,
void HistoryService::NotifyProfileError(int backend_id,
sql::InitStatus init_status) {
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
VLOG(1) << "Message from obsolete backend";
return;
}
@@ -914,7 +914,7 @@ void HistoryService::BroadcastNotificationsHelper(
}
void HistoryService::LoadBackendIfNecessary() {
- if (!thread_ || history_backend_)
+ if (!thread_ || history_backend_.get())
return; // Failed to init, or already started loading.
++current_backend_id_;
@@ -935,7 +935,7 @@ void HistoryService::LoadBackendIfNecessary() {
}
void HistoryService::OnDBLoaded(int backend_id) {
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
VLOG(1) << "Message from obsolete backend";
return;
}
@@ -958,7 +958,7 @@ bool HistoryService::GetRowForURL(const GURL& url, history::URLRow* url_row) {
}
void HistoryService::StartTopSitesMigration(int backend_id) {
- if (!history_backend_ || current_backend_id_ != backend_id) {
+ if (!history_backend_.get() || current_backend_id_ != backend_id) {
VLOG(1) << "Message from obsolete backend";
return;
}
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698