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

Side by Side Diff: components/webdata/common/web_data_service_base.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/webdata/common/web_data_service_base.h" 5 #include "components/webdata/common/web_data_service_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 wdbs_->ShutdownDatabase(); 54 wdbs_->ShutdownDatabase();
55 } 55 }
56 56
57 void WebDataServiceBase::CancelRequest(Handle h) { 57 void WebDataServiceBase::CancelRequest(Handle h) {
58 if (!wdbs_.get()) 58 if (!wdbs_.get())
59 return; 59 return;
60 wdbs_->CancelRequest(h); 60 wdbs_->CancelRequest(h);
61 } 61 }
62 62
63 bool WebDataServiceBase::IsDatabaseLoaded() { 63 bool WebDataServiceBase::IsDatabaseLoaded() {
64 if (!wdbs_) 64 if (!wdbs_.get())
65 return false; 65 return false;
66 return wdbs_->db_loaded(); 66 return wdbs_->db_loaded();
67 } 67 }
68 68
69 void WebDataServiceBase::RegisterDBLoadedCallback( 69 void WebDataServiceBase::RegisterDBLoadedCallback(
70 const base::Callback<void(void)>& callback) { 70 const base::Callback<void(void)>& callback) {
71 if (!wdbs_) 71 if (!wdbs_.get())
72 return; 72 return;
73 wdbs_->RegisterDBLoadedCallback(callback); 73 wdbs_->RegisterDBLoadedCallback(callback);
74 } 74 }
75 75
76 WebDatabase* WebDataServiceBase::GetDatabase() { 76 WebDatabase* WebDataServiceBase::GetDatabase() {
77 if (!wdbs_.get()) 77 if (!wdbs_.get())
78 return NULL; 78 return NULL;
79 return wdbs_->GetDatabaseOnDB(); 79 return wdbs_->GetDatabaseOnDB();
80 } 80 }
81 81
82 WebDataServiceBase::~WebDataServiceBase() { 82 WebDataServiceBase::~WebDataServiceBase() {
83 } 83 }
OLDNEW
« no previous file with comments | « chrome/utility/profile_import_handler.cc ('k') | content/browser/appcache/chrome_appcache_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698