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

Side by Side Diff: content/browser/background_sync/background_sync_context.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/background_sync/background_sync_context.h" 5 #include "content/browser/background_sync/background_sync_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 26 matching lines...) Expand all
37 37
38 void BackgroundSyncContext::Shutdown() { 38 void BackgroundSyncContext::Shutdown() {
39 DCHECK_CURRENTLY_ON(BrowserThread::UI); 39 DCHECK_CURRENTLY_ON(BrowserThread::UI);
40 40
41 BrowserThread::PostTask( 41 BrowserThread::PostTask(
42 BrowserThread::IO, FROM_HERE, 42 BrowserThread::IO, FROM_HERE,
43 base::Bind(&BackgroundSyncContext::ShutdownOnIO, this)); 43 base::Bind(&BackgroundSyncContext::ShutdownOnIO, this));
44 } 44 }
45 45
46 void BackgroundSyncContext::CreateService( 46 void BackgroundSyncContext::CreateService(
47 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request) { 47 const service_manager::BindSourceInfo& source_info,
48 blink::mojom::BackgroundSyncServiceRequest request) {
48 DCHECK_CURRENTLY_ON(BrowserThread::UI); 49 DCHECK_CURRENTLY_ON(BrowserThread::UI);
49 50
50 BrowserThread::PostTask( 51 BrowserThread::PostTask(
51 BrowserThread::IO, FROM_HERE, 52 BrowserThread::IO, FROM_HERE,
52 base::Bind(&BackgroundSyncContext::CreateServiceOnIOThread, this, 53 base::Bind(&BackgroundSyncContext::CreateServiceOnIOThread, this,
53 base::Passed(&request))); 54 base::Passed(&request)));
54 } 55 }
55 56
56 void BackgroundSyncContext::ServiceHadConnectionError( 57 void BackgroundSyncContext::ServiceHadConnectionError(
57 BackgroundSyncServiceImpl* service) { 58 BackgroundSyncServiceImpl* service) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 93 }
93 94
94 void BackgroundSyncContext::ShutdownOnIO() { 95 void BackgroundSyncContext::ShutdownOnIO() {
95 DCHECK_CURRENTLY_ON(BrowserThread::IO); 96 DCHECK_CURRENTLY_ON(BrowserThread::IO);
96 97
97 services_.clear(); 98 services_.clear();
98 background_sync_manager_.reset(); 99 background_sync_manager_.reset();
99 } 100 }
100 101
101 } // namespace content 102 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698