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

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 7024058: [Sync] Clean up sync logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: even more logging Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 "", 164 "",
165 PrefService::UNSYNCABLE_PREF); 165 PrefService::UNSYNCABLE_PREF);
166 #endif 166 #endif
167 } 167 }
168 168
169 // static 169 // static
170 net::URLRequestContextGetter* Profile::GetDefaultRequestContext() { 170 net::URLRequestContextGetter* Profile::GetDefaultRequestContext() {
171 return default_request_context_; 171 return default_request_context_;
172 } 172 }
173 173
174 std::string Profile::GetDebugName() {
175 std::string name = GetPath().BaseName().MaybeAsASCII();
176 if (name.empty()) {
177 name = "UnknownProfile";
178 }
179 return name;
180 }
181
174 bool Profile::IsGuestSession() { 182 bool Profile::IsGuestSession() {
175 #if defined(OS_CHROMEOS) 183 #if defined(OS_CHROMEOS)
176 static bool is_guest_session = 184 static bool is_guest_session =
177 CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession); 185 CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession);
178 return is_guest_session; 186 return is_guest_session;
179 #else 187 #else
180 return false; 188 return false;
181 #endif 189 #endif
182 } 190 }
183 191
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 }; 831 };
824 #endif 832 #endif
825 833
826 Profile* Profile::CreateOffTheRecordProfile() { 834 Profile* Profile::CreateOffTheRecordProfile() {
827 #if defined(OS_CHROMEOS) 835 #if defined(OS_CHROMEOS)
828 if (Profile::IsGuestSession()) 836 if (Profile::IsGuestSession())
829 return new GuestSessionProfile(this); 837 return new GuestSessionProfile(this);
830 #endif 838 #endif
831 return new OffTheRecordProfileImpl(this); 839 return new OffTheRecordProfileImpl(this);
832 } 840 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698