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

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

Issue 2850203002: PaymentHandler: Implement PaymentInstruments.keys(). (Closed)
Patch Set: PaymentHandler: Implement PaymentInstruments.Keys(). 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 const GetUserDataCallback& callback) { 666 const GetUserDataCallback& callback) {
667 DCHECK_CURRENTLY_ON(BrowserThread::IO); 667 DCHECK_CURRENTLY_ON(BrowserThread::IO);
668 if (!context_core_) { 668 if (!context_core_) {
669 RunSoon(base::Bind(callback, std::vector<std::string>(), 669 RunSoon(base::Bind(callback, std::vector<std::string>(),
670 SERVICE_WORKER_ERROR_ABORT)); 670 SERVICE_WORKER_ERROR_ABORT));
671 return; 671 return;
672 } 672 }
673 context_core_->storage()->GetUserData(registration_id, keys, callback); 673 context_core_->storage()->GetUserData(registration_id, keys, callback);
674 } 674 }
675 675
676 void ServiceWorkerContextWrapper::GetRegistrationUserDataByKeyPrefix(
677 int64_t registration_id,
678 const std::string& key_prefix,
679 const GetUserDataCallback& callback) {
680 DCHECK_CURRENTLY_ON(BrowserThread::IO);
681 if (!context_core_) {
682 RunSoon(base::Bind(callback, std::vector<std::string>(),
683 SERVICE_WORKER_ERROR_ABORT));
684 return;
685 }
686 context_core_->storage()->GetUserDataByKeyPrefix(registration_id, key_prefix,
687 callback);
688 }
689
676 void ServiceWorkerContextWrapper::StoreRegistrationUserData( 690 void ServiceWorkerContextWrapper::StoreRegistrationUserData(
677 int64_t registration_id, 691 int64_t registration_id,
678 const GURL& origin, 692 const GURL& origin,
679 const std::vector<std::pair<std::string, std::string>>& key_value_pairs, 693 const std::vector<std::pair<std::string, std::string>>& key_value_pairs,
680 const StatusCallback& callback) { 694 const StatusCallback& callback) {
681 DCHECK_CURRENTLY_ON(BrowserThread::IO); 695 DCHECK_CURRENTLY_ON(BrowserThread::IO);
682 if (!context_core_) { 696 if (!context_core_) {
683 RunSoon(base::Bind(callback, SERVICE_WORKER_ERROR_ABORT)); 697 RunSoon(base::Bind(callback, SERVICE_WORKER_ERROR_ABORT));
684 return; 698 return;
685 } 699 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 service_worker_provider_id, 822 service_worker_provider_id,
809 std::move(client_ptr_info)); 823 std::move(client_ptr_info));
810 } 824 }
811 825
812 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { 826 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() {
813 DCHECK_CURRENTLY_ON(BrowserThread::IO); 827 DCHECK_CURRENTLY_ON(BrowserThread::IO);
814 return context_core_.get(); 828 return context_core_.get();
815 } 829 }
816 830
817 } // namespace content 831 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698