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/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 bool Profile::IsGuestSession() { | 110 bool Profile::IsGuestSession() { |
111 #if defined(OS_CHROMEOS) | 111 #if defined(OS_CHROMEOS) |
112 static bool is_guest_session = | 112 static bool is_guest_session = |
113 CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); | 113 CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); |
114 return is_guest_session; | 114 return is_guest_session; |
115 #else | 115 #else |
116 return false; | 116 return false; |
117 #endif | 117 #endif |
118 } | 118 } |
119 | 119 |
120 net::URLRequestContextGetter* Profile::GetRequestContextForStoragePartition( | |
Charlie Reis
2012/09/15 01:06:25
Why not just rename GetRequestContextForIsolatedAp
| |
121 const std::string& partition_id) { | |
122 return GetRequestContextForIsolatedApp(partition_id); | |
123 } | |
124 | |
120 bool Profile::IsSyncAccessible() { | 125 bool Profile::IsSyncAccessible() { |
121 browser_sync::SyncPrefs prefs(GetPrefs()); | 126 browser_sync::SyncPrefs prefs(GetPrefs()); |
122 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); | 127 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); |
123 } | 128 } |
124 | 129 |
125 void Profile::MaybeSendDestroyedNotification() { | 130 void Profile::MaybeSendDestroyedNotification() { |
126 if (!sent_destroyed_notification_) { | 131 if (!sent_destroyed_notification_) { |
127 sent_destroyed_notification_ = true; | 132 sent_destroyed_notification_ = true; |
128 content::NotificationService::current()->Notify( | 133 content::NotificationService::current()->Notify( |
129 chrome::NOTIFICATION_PROFILE_DESTROYED, | 134 chrome::NOTIFICATION_PROFILE_DESTROYED, |
130 content::Source<Profile>(this), | 135 content::Source<Profile>(this), |
131 content::NotificationService::NoDetails()); | 136 content::NotificationService::NoDetails()); |
132 } | 137 } |
133 } | 138 } |
OLD | NEW |