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

Side by Side Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 2873683002: PaymentHandler: Implement GetAllPaymentApps(). (Closed)
Patch Set: installed -> stored in public Created 3 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/service_worker/service_worker_context_wrapper.h" 5 #include "content/browser/service_worker/service_worker_context_wrapper.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 const GetUserDataForAllRegistrationsCallback& callback) { 718 const GetUserDataForAllRegistrationsCallback& callback) {
719 DCHECK_CURRENTLY_ON(BrowserThread::IO); 719 DCHECK_CURRENTLY_ON(BrowserThread::IO);
720 if (!context_core_) { 720 if (!context_core_) {
721 RunSoon(base::Bind(callback, std::vector<std::pair<int64_t, std::string>>(), 721 RunSoon(base::Bind(callback, std::vector<std::pair<int64_t, std::string>>(),
722 SERVICE_WORKER_ERROR_ABORT)); 722 SERVICE_WORKER_ERROR_ABORT));
723 return; 723 return;
724 } 724 }
725 context_core_->storage()->GetUserDataForAllRegistrations(key, callback); 725 context_core_->storage()->GetUserDataForAllRegistrations(key, callback);
726 } 726 }
727 727
728 void ServiceWorkerContextWrapper::GetUserDataForAllRegistrationsByKeyPrefix(
729 const std::string& key_prefix,
730 const GetUserDataForAllRegistrationsCallback& callback) {
731 DCHECK_CURRENTLY_ON(BrowserThread::IO);
732 if (!context_core_) {
733 RunSoon(base::Bind(callback, std::vector<std::pair<int64_t, std::string>>(),
734 SERVICE_WORKER_ERROR_ABORT));
735 return;
736 }
737 context_core_->storage()->GetUserDataForAllRegistrationsByKeyPrefix(
738 key_prefix, callback);
739 }
740
728 void ServiceWorkerContextWrapper::AddObserver( 741 void ServiceWorkerContextWrapper::AddObserver(
729 ServiceWorkerContextObserver* observer) { 742 ServiceWorkerContextObserver* observer) {
730 observer_list_->AddObserver(observer); 743 observer_list_->AddObserver(observer);
731 } 744 }
732 745
733 void ServiceWorkerContextWrapper::RemoveObserver( 746 void ServiceWorkerContextWrapper::RemoveObserver(
734 ServiceWorkerContextObserver* observer) { 747 ServiceWorkerContextObserver* observer) {
735 observer_list_->RemoveObserver(observer); 748 observer_list_->RemoveObserver(observer);
736 } 749 }
737 750
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 service_worker_provider_id, 835 service_worker_provider_id,
823 std::move(client_ptr_info)); 836 std::move(client_ptr_info));
824 } 837 }
825 838
826 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { 839 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() {
827 DCHECK_CURRENTLY_ON(BrowserThread::IO); 840 DCHECK_CURRENTLY_ON(BrowserThread::IO);
828 return context_core_.get(); 841 return context_core_.get();
829 } 842 }
830 843
831 } // namespace content 844 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698