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( | |
121 const std::string& partition_id) { | |
122 return GetRequestContextForIsolatedApp(partition_id); | |
123 } | |
124 | |
125 bool Profile::IsSyncAccessible() { | 120 bool Profile::IsSyncAccessible() { |
126 browser_sync::SyncPrefs prefs(GetPrefs()); | 121 browser_sync::SyncPrefs prefs(GetPrefs()); |
127 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); | 122 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); |
128 } | 123 } |
129 | 124 |
130 void Profile::MaybeSendDestroyedNotification() { | 125 void Profile::MaybeSendDestroyedNotification() { |
131 if (!sent_destroyed_notification_) { | 126 if (!sent_destroyed_notification_) { |
132 sent_destroyed_notification_ = true; | 127 sent_destroyed_notification_ = true; |
133 content::NotificationService::current()->Notify( | 128 content::NotificationService::current()->Notify( |
134 chrome::NOTIFICATION_PROFILE_DESTROYED, | 129 chrome::NOTIFICATION_PROFILE_DESTROYED, |
135 content::Source<Profile>(this), | 130 content::Source<Profile>(this), |
136 content::NotificationService::NoDetails()); | 131 content::NotificationService::NoDetails()); |
137 } | 132 } |
138 } | 133 } |
OLD | NEW |