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

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

Issue 845313004: Service Worker: Improve error messages from register(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git-cl format Created 5 years, 11 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 <vector> 10 #include <vector>
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 void ServiceWorkerContextWrapper::set_storage_partition( 136 void ServiceWorkerContextWrapper::set_storage_partition(
137 StoragePartitionImpl* storage_partition) { 137 StoragePartitionImpl* storage_partition) {
138 DCHECK_CURRENTLY_ON(BrowserThread::UI); 138 DCHECK_CURRENTLY_ON(BrowserThread::UI);
139 storage_partition_ = storage_partition; 139 storage_partition_ = storage_partition;
140 } 140 }
141 141
142 static void FinishRegistrationOnIO( 142 static void FinishRegistrationOnIO(
143 const ServiceWorkerContext::ResultCallback& continuation, 143 const ServiceWorkerContext::ResultCallback& continuation,
144 ServiceWorkerStatusCode status, 144 ServiceWorkerStatusCode status,
145 const std::string& status_message,
145 int64 registration_id) { 146 int64 registration_id) {
146 DCHECK_CURRENTLY_ON(BrowserThread::IO); 147 DCHECK_CURRENTLY_ON(BrowserThread::IO);
147 BrowserThread::PostTask( 148 BrowserThread::PostTask(
148 BrowserThread::UI, 149 BrowserThread::UI,
149 FROM_HERE, 150 FROM_HERE,
150 base::Bind(continuation, status == SERVICE_WORKER_OK)); 151 base::Bind(continuation, status == SERVICE_WORKER_OK));
151 } 152 }
152 153
153 void ServiceWorkerContextWrapper::RegisterServiceWorker( 154 void ServiceWorkerContextWrapper::RegisterServiceWorker(
154 const GURL& pattern, 155 const GURL& pattern,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 context_core_.reset(); 378 context_core_.reset();
378 return; 379 return;
379 } 380 }
380 context_core_.reset(new ServiceWorkerContextCore(context_core_.get(), this)); 381 context_core_.reset(new ServiceWorkerContextCore(context_core_.get(), this));
381 DVLOG(1) << "Restarted ServiceWorkerContextCore successfully."; 382 DVLOG(1) << "Restarted ServiceWorkerContextCore successfully.";
382 383
383 observer_list_->Notify(&ServiceWorkerContextObserver::OnStorageWiped); 384 observer_list_->Notify(&ServiceWorkerContextObserver::OnStorageWiped);
384 } 385 }
385 386
386 } // namespace content 387 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698