| 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/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 11 #include "chrome/browser/extensions/extension_system.h" |
| 11 #include "chrome/browser/managed_mode/managed_mode_site_list.h" | 12 #include "chrome/browser/managed_mode/managed_mode_site_list.h" |
| 12 #include "chrome/browser/prefs/pref_registry_syncable.h" | 13 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| 13 #include "chrome/browser/prefs/pref_service.h" | |
| 14 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 14 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
| 17 #include "chrome/common/extensions/extension_set.h" | 17 #include "chrome/common/extensions/extension_set.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| 20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 22 | 22 |
| 23 using content::BrowserThread; | 23 using content::BrowserThread; |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 profile_->GetPrefs()->GetDictionary(prefs::kManagedModeManualURLs); | 360 profile_->GetPrefs()->GetDictionary(prefs::kManagedModeManualURLs); |
| 361 scoped_ptr<std::map<GURL, bool> > url_map(new std::map<GURL, bool>()); | 361 scoped_ptr<std::map<GURL, bool> > url_map(new std::map<GURL, bool>()); |
| 362 for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { | 362 for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) { |
| 363 bool allow = false; | 363 bool allow = false; |
| 364 bool result = it.value().GetAsBoolean(&allow); | 364 bool result = it.value().GetAsBoolean(&allow); |
| 365 DCHECK(result); | 365 DCHECK(result); |
| 366 (*url_map)[GURL(it.key())] = allow; | 366 (*url_map)[GURL(it.key())] = allow; |
| 367 } | 367 } |
| 368 url_filter_context_.SetManualURLs(url_map.Pass()); | 368 url_filter_context_.SetManualURLs(url_map.Pass()); |
| 369 } | 369 } |
| OLD | NEW |