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

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

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 BrowserThread::PostTask( 49 BrowserThread::PostTask(
50 BrowserThread::IO, FROM_HERE, 50 BrowserThread::IO, FROM_HERE,
51 base::Bind(&BackgroundSyncContext::CreateServiceOnIOThread, this, 51 base::Bind(&BackgroundSyncContext::CreateServiceOnIOThread, this,
52 base::Passed(&request))); 52 base::Passed(&request)));
53 } 53 }
54 54
55 void BackgroundSyncContext::ServiceHadConnectionError( 55 void BackgroundSyncContext::ServiceHadConnectionError(
56 BackgroundSyncServiceImpl* service) { 56 BackgroundSyncServiceImpl* service) {
57 DCHECK_CURRENTLY_ON(BrowserThread::IO); 57 DCHECK_CURRENTLY_ON(BrowserThread::IO);
58 DCHECK(ContainsValue(services_, service)); 58 DCHECK(base::ContainsValue(services_, service));
59 59
60 services_.erase(service); 60 services_.erase(service);
61 delete service; 61 delete service;
62 } 62 }
63 63
64 BackgroundSyncManager* BackgroundSyncContext::background_sync_manager() const { 64 BackgroundSyncManager* BackgroundSyncContext::background_sync_manager() const {
65 DCHECK_CURRENTLY_ON(BrowserThread::IO); 65 DCHECK_CURRENTLY_ON(BrowserThread::IO);
66 66
67 return background_sync_manager_.get(); 67 return background_sync_manager_.get();
68 } 68 }
(...skipping 16 matching lines...) Expand all
85 void BackgroundSyncContext::CreateServiceOnIOThread( 85 void BackgroundSyncContext::CreateServiceOnIOThread(
86 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request) { 86 mojo::InterfaceRequest<blink::mojom::BackgroundSyncService> request) {
87 DCHECK_CURRENTLY_ON(BrowserThread::IO); 87 DCHECK_CURRENTLY_ON(BrowserThread::IO);
88 DCHECK(background_sync_manager_); 88 DCHECK(background_sync_manager_);
89 services_.insert(new BackgroundSyncServiceImpl(this, std::move(request))); 89 services_.insert(new BackgroundSyncServiceImpl(this, std::move(request)));
90 } 90 }
91 91
92 void BackgroundSyncContext::ShutdownOnIO() { 92 void BackgroundSyncContext::ShutdownOnIO() {
93 DCHECK_CURRENTLY_ON(BrowserThread::IO); 93 DCHECK_CURRENTLY_ON(BrowserThread::IO);
94 94
95 STLDeleteElements(&services_); 95 base::STLDeleteElements(&services_);
96 background_sync_manager_.reset(); 96 background_sync_manager_.reset();
97 } 97 }
98 98
99 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_update_job_unittest.cc ('k') | content/browser/bluetooth/bluetooth_allowed_devices_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698