OLD | NEW |
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 "chrome/browser/supervised_user/supervised_user_service.h" | 5 #include "chrome/browser/supervised_user/supervised_user_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 BrowserThread::IO, | 470 BrowserThread::IO, |
471 FROM_HERE, | 471 FROM_HERE, |
472 base::Bind(&SupervisedUserURLFilter::Clear, | 472 base::Bind(&SupervisedUserURLFilter::Clear, |
473 io_url_filter_)); | 473 io_url_filter_)); |
474 } | 474 } |
475 | 475 |
476 void SupervisedUserService::URLFilterContext::InitAsyncURLChecker( | 476 void SupervisedUserService::URLFilterContext::InitAsyncURLChecker( |
477 const scoped_refptr<net::URLRequestContextGetter>& context) { | 477 const scoped_refptr<net::URLRequestContextGetter>& context) { |
478 ui_url_filter_->InitAsyncURLChecker(context.get()); | 478 ui_url_filter_->InitAsyncURLChecker(context.get()); |
479 BrowserThread::PostTask( | 479 BrowserThread::PostTask( |
480 BrowserThread::IO, | 480 BrowserThread::IO, FROM_HERE, |
481 FROM_HERE, | 481 base::Bind(&SupervisedUserURLFilter::InitAsyncURLChecker, io_url_filter_, |
482 base::Bind(&SupervisedUserURLFilter::InitAsyncURLChecker, | 482 base::RetainedRef(context))); |
483 io_url_filter_, context)); | |
484 } | 483 } |
485 | 484 |
486 bool SupervisedUserService::URLFilterContext::HasAsyncURLChecker() const { | 485 bool SupervisedUserService::URLFilterContext::HasAsyncURLChecker() const { |
487 return ui_url_filter_->HasAsyncURLChecker(); | 486 return ui_url_filter_->HasAsyncURLChecker(); |
488 } | 487 } |
489 | 488 |
490 void SupervisedUserService::URLFilterContext::ClearAsyncURLChecker() { | 489 void SupervisedUserService::URLFilterContext::ClearAsyncURLChecker() { |
491 ui_url_filter_->ClearAsyncURLChecker(); | 490 ui_url_filter_->ClearAsyncURLChecker(); |
492 BrowserThread::PostTask( | 491 BrowserThread::PostTask( |
493 BrowserThread::IO, | 492 BrowserThread::IO, |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile")); | 1044 content::RecordAction(UserMetricsAction("ManagedUsers_SwitchProfile")); |
1046 | 1045 |
1047 is_profile_active_ = profile_became_active; | 1046 is_profile_active_ = profile_became_active; |
1048 } | 1047 } |
1049 #endif // !defined(OS_ANDROID) | 1048 #endif // !defined(OS_ANDROID) |
1050 | 1049 |
1051 void SupervisedUserService::OnSiteListUpdated() { | 1050 void SupervisedUserService::OnSiteListUpdated() { |
1052 FOR_EACH_OBSERVER( | 1051 FOR_EACH_OBSERVER( |
1053 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); | 1052 SupervisedUserServiceObserver, observer_list_, OnURLFilterChanged()); |
1054 } | 1053 } |
OLD | NEW |