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

Side by Side Diff: chrome/browser/managed_mode.cc

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
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.h" 5 #include "chrome/browser/managed_mode.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 11 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
12 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" 12 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
13 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_window.h" 14 #include "chrome/browser/ui/browser_window.h"
14 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
15 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
17 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
18 19
19 // static 20 // static
20 ManagedMode* ManagedMode::GetInstance() { 21 ManagedMode* ManagedMode::GetInstance() {
21 return Singleton<ManagedMode>::get(); 22 return Singleton<ManagedMode>::get();
22 } 23 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 void ManagedMode::SetInManagedMode(bool in_managed_mode) { 200 void ManagedMode::SetInManagedMode(bool in_managed_mode) {
200 g_browser_process->local_state()->SetBoolean(prefs::kInManagedMode, 201 g_browser_process->local_state()->SetBoolean(prefs::kInManagedMode,
201 in_managed_mode); 202 in_managed_mode);
202 // This causes the avatar and the profile menu to get updated. 203 // This causes the avatar and the profile menu to get updated.
203 content::NotificationService::current()->Notify( 204 content::NotificationService::current()->Notify(
204 chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, 205 chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
205 content::NotificationService::AllBrowserContextsAndSources(), 206 content::NotificationService::AllBrowserContextsAndSources(),
206 content::NotificationService::NoDetails()); 207 content::NotificationService::NoDetails());
207 } 208 }
208 209
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698