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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/safe_browsing/safe_browsing_service.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 CookieFilePath(), 188 CookieFilePath(),
189 content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES, nullptr, 189 content::CookieStoreConfig::EPHEMERAL_SESSION_COOKIES, nullptr,
190 nullptr)); 190 nullptr));
191 191
192 safe_browsing_request_context_->set_cookie_store( 192 safe_browsing_request_context_->set_cookie_store(
193 safe_browsing_cookie_store_.get()); 193 safe_browsing_cookie_store_.get());
194 194
195 // Set up the ChannelIDService 195 // Set up the ChannelIDService
196 scoped_refptr<net::SQLiteChannelIDStore> channel_id_db = 196 scoped_refptr<net::SQLiteChannelIDStore> channel_id_db =
197 new net::SQLiteChannelIDStore( 197 new net::SQLiteChannelIDStore(
198 ChannelIDFilePath(), base::CreateSequencedTaskRunnerWithTraits( 198 ChannelIDFilePath(),
199 base::TaskTraits().MayBlock().WithPriority( 199 base::CreateSequencedTaskRunnerWithTraits(
200 base::TaskPriority::BACKGROUND))); 200 {base::MayBlock(), base::TaskPriority::BACKGROUND}));
201 channel_id_service_.reset(new net::ChannelIDService( 201 channel_id_service_.reset(new net::ChannelIDService(
202 new net::DefaultChannelIDStore(channel_id_db.get()))); 202 new net::DefaultChannelIDStore(channel_id_db.get())));
203 safe_browsing_request_context_->set_channel_id_service( 203 safe_browsing_request_context_->set_channel_id_service(
204 channel_id_service_.get()); 204 channel_id_service_.get());
205 safe_browsing_cookie_store_->SetChannelIDServiceID( 205 safe_browsing_cookie_store_->SetChannelIDServiceID(
206 channel_id_service_->GetUniqueID()); 206 channel_id_service_->GetUniqueID());
207 207
208 // Rebuild the HttpNetworkSession and the HttpTransactionFactory to use the 208 // Rebuild the HttpNetworkSession and the HttpTransactionFactory to use the
209 // new ChannelIDService. 209 // new ChannelIDService.
210 if (safe_browsing_request_context_->http_transaction_factory() && 210 if (safe_browsing_request_context_->http_transaction_factory() &&
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 770
771 void SafeBrowsingService::RemovePasswordProtectionService(Profile* profile) { 771 void SafeBrowsingService::RemovePasswordProtectionService(Profile* profile) {
772 DCHECK_CURRENTLY_ON(BrowserThread::UI); 772 DCHECK_CURRENTLY_ON(BrowserThread::UI);
773 DCHECK(profile); 773 DCHECK(profile);
774 auto it = password_protection_service_map_.find(profile); 774 auto it = password_protection_service_map_.find(profile);
775 if (it != password_protection_service_map_.end()) 775 if (it != password_protection_service_map_.end())
776 password_protection_service_map_.erase(it); 776 password_protection_service_map_.erase(it);
777 } 777 }
778 778
779 } // namespace safe_browsing 779 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698