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

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: Fix comments 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
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/sync/engine/syncapi.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 }; 827 };
820 #endif 828 #endif
821 829
822 Profile* Profile::CreateOffTheRecordProfile() { 830 Profile* Profile::CreateOffTheRecordProfile() {
823 #if defined(OS_CHROMEOS) 831 #if defined(OS_CHROMEOS)
824 if (Profile::IsGuestSession()) 832 if (Profile::IsGuestSession())
825 return new GuestSessionProfile(this); 833 return new GuestSessionProfile(this);
826 #endif 834 #endif
827 return new OffTheRecordProfileImpl(this); 835 return new OffTheRecordProfileImpl(this);
828 } 836 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/sync/engine/syncapi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698