OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/managed_mode/managed_user_service.h" | 5 #include "chrome/browser/managed_mode/managed_user_service.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/task/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
11 #include "chrome/browser/extensions/extension_system.h" | 11 #include "chrome/browser/extensions/extension_system.h" |
12 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" | 12 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" |
13 #include "chrome/browser/managed_mode/managed_mode_site_list.h" | 13 #include "chrome/browser/managed_mode/managed_mode_site_list.h" |
14 #include "chrome/browser/policy/managed_mode_policy_provider.h" | 14 #include "chrome/browser/policy/managed_mode_policy_provider.h" |
15 #include "chrome/browser/policy/profile_policy_connector.h" | 15 #include "chrome/browser/policy/profile_policy_connector.h" |
16 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 16 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
17 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 17 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 profile_->GetPrefs()->GetDictionary(prefs::kManagedModeManualURLs); | 537 profile_->GetPrefs()->GetDictionary(prefs::kManagedModeManualURLs); |
538 scoped_ptr<std::map<GURL, bool> > url_map(new std::map<GURL, bool>()); | 538 scoped_ptr<std::map<GURL, bool> > url_map(new std::map<GURL, bool>()); |
539 for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { | 539 for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { |
540 bool allow = false; | 540 bool allow = false; |
541 bool result = it.value().GetAsBoolean(&allow); | 541 bool result = it.value().GetAsBoolean(&allow); |
542 DCHECK(result); | 542 DCHECK(result); |
543 (*url_map)[GURL(it.key())] = allow; | 543 (*url_map)[GURL(it.key())] = allow; |
544 } | 544 } |
545 url_filter_context_.SetManualURLs(url_map.Pass()); | 545 url_filter_context_.SetManualURLs(url_map.Pass()); |
546 } | 546 } |
OLD | NEW |