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

Side by Side Diff: components/policy/core/browser/url_blacklist_manager.cc

Issue 506633004: Remove implicit conversions from scoped_refptr to T* in components/policy/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some more changes Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/policy/core/browser/url_blacklist_manager.h" 5 #include "components/policy/core/browser/url_blacklist_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 base::Passed(&block), 462 base::Passed(&block),
463 base::Passed(&allow))); 463 base::Passed(&allow)));
464 } 464 }
465 465
466 void URLBlacklistManager::UpdateOnIO(scoped_ptr<base::ListValue> block, 466 void URLBlacklistManager::UpdateOnIO(scoped_ptr<base::ListValue> block,
467 scoped_ptr<base::ListValue> allow) { 467 scoped_ptr<base::ListValue> allow) {
468 DCHECK(io_task_runner_->RunsTasksOnCurrentThread()); 468 DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
469 // The URLBlacklist is built on a worker thread. Once it's ready, it is passed 469 // The URLBlacklist is built on a worker thread. Once it's ready, it is passed
470 // to the URLBlacklistManager on IO. 470 // to the URLBlacklistManager on IO.
471 base::PostTaskAndReplyWithResult( 471 base::PostTaskAndReplyWithResult(
472 background_task_runner_, 472 background_task_runner_.get(),
473 FROM_HERE, 473 FROM_HERE,
474 base::Bind(&BuildBlacklist, 474 base::Bind(&BuildBlacklist,
475 base::Passed(&block), 475 base::Passed(&block),
476 base::Passed(&allow), 476 base::Passed(&allow),
477 segment_url_), 477 segment_url_),
478 base::Bind(&URLBlacklistManager::SetBlacklist, 478 base::Bind(&URLBlacklistManager::SetBlacklist,
479 io_weak_ptr_factory_.GetWeakPtr())); 479 io_weak_ptr_factory_.GetWeakPtr()));
480 } 480 }
481 481
482 void URLBlacklistManager::SetBlacklist(scoped_ptr<URLBlacklist> blacklist) { 482 void URLBlacklistManager::SetBlacklist(scoped_ptr<URLBlacklist> blacklist) {
(...skipping 27 matching lines...) Expand all
510 // static 510 // static
511 void URLBlacklistManager::RegisterProfilePrefs( 511 void URLBlacklistManager::RegisterProfilePrefs(
512 user_prefs::PrefRegistrySyncable* registry) { 512 user_prefs::PrefRegistrySyncable* registry) {
513 registry->RegisterListPref(policy_prefs::kUrlBlacklist, 513 registry->RegisterListPref(policy_prefs::kUrlBlacklist,
514 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 514 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
515 registry->RegisterListPref(policy_prefs::kUrlWhitelist, 515 registry->RegisterListPref(policy_prefs::kUrlWhitelist,
516 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 516 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
517 } 517 }
518 518
519 } // namespace policy 519 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698