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

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

Issue 17760007: components/webdata: Cleanup callback usage in WebDatabaseService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disallow Created 7 years, 5 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 wdbs_->CancelRequest(h); 55 wdbs_->CancelRequest(h);
56 } 56 }
57 57
58 bool WebDataServiceBase::IsDatabaseLoaded() { 58 bool WebDataServiceBase::IsDatabaseLoaded() {
59 if (!wdbs_.get()) 59 if (!wdbs_.get())
60 return false; 60 return false;
61 return wdbs_->db_loaded(); 61 return wdbs_->db_loaded();
62 } 62 }
63 63
64 void WebDataServiceBase::RegisterDBLoadedCallback( 64 void WebDataServiceBase::RegisterDBLoadedCallback(
65 const base::Callback<void(void)>& callback) { 65 const DBLoadedCallback& callback) {
66 if (!wdbs_.get()) 66 if (!wdbs_.get())
67 return; 67 return;
68 wdbs_->RegisterDBLoadedCallback(callback); 68 wdbs_->RegisterDBLoadedCallback(callback);
69 } 69 }
70 70
71 WebDatabase* WebDataServiceBase::GetDatabase() { 71 WebDatabase* WebDataServiceBase::GetDatabase() {
72 if (!wdbs_.get()) 72 if (!wdbs_.get())
73 return NULL; 73 return NULL;
74 return wdbs_->GetDatabaseOnDB(); 74 return wdbs_->GetDatabaseOnDB();
75 } 75 }
76 76
77 WebDataServiceBase::~WebDataServiceBase() { 77 WebDataServiceBase::~WebDataServiceBase() {
78 } 78 }
OLDNEW
« no previous file with comments | « components/webdata/common/web_data_service_base.h ('k') | components/webdata/common/web_database_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698