OLD | NEW |
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/managed_mode/managed_mode.h" | 5 #include "chrome/browser/managed_mode/managed_mode.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_change_registrar.h" | 8 #include "base/prefs/pref_change_registrar.h" |
9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/task/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.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/url_blacklist_manager.h" | 14 #include "chrome/browser/policy/url_blacklist_manager.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/browser_iterator.h" | 17 #include "chrome/browser/ui/browser_iterator.h" |
18 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
19 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 managed_profile_ = newly_managed_profile; | 234 managed_profile_ = newly_managed_profile; |
235 g_browser_process->local_state()->SetBoolean(prefs::kInManagedMode, | 235 g_browser_process->local_state()->SetBoolean(prefs::kInManagedMode, |
236 !!newly_managed_profile); | 236 !!newly_managed_profile); |
237 | 237 |
238 // This causes the avatar and the profile menu to get updated. | 238 // This causes the avatar and the profile menu to get updated. |
239 content::NotificationService::current()->Notify( | 239 content::NotificationService::current()->Notify( |
240 chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, | 240 chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, |
241 content::NotificationService::AllBrowserContextsAndSources(), | 241 content::NotificationService::AllBrowserContextsAndSources(), |
242 content::NotificationService::NoDetails()); | 242 content::NotificationService::NoDetails()); |
243 } | 243 } |
OLD | NEW |