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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
« no previous file with comments | « chrome/browser/process_singleton_win.cc ('k') | chrome/browser/profiles/profile_browsertest.cc » ('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) 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 "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 std::string Profile::GetDebugName() { 198 std::string Profile::GetDebugName() {
199 std::string name = GetPath().BaseName().MaybeAsASCII(); 199 std::string name = GetPath().BaseName().MaybeAsASCII();
200 if (name.empty()) { 200 if (name.empty()) {
201 name = "UnknownProfile"; 201 name = "UnknownProfile";
202 } 202 }
203 return name; 203 return name;
204 } 204 }
205 205
206 bool Profile::IsGuestSession() const { 206 bool Profile::IsGuestSession() const {
207 #if defined(OS_CHROMEOS) 207 #if defined(OS_CHROMEOS)
208 static bool is_guest_session = CommandLine::ForCurrentProcess()->HasSwitch( 208 static bool is_guest_session =
209 chromeos::switches::kGuestSession); 209 base::CommandLine::ForCurrentProcess()->HasSwitch(
210 chromeos::switches::kGuestSession);
210 return is_guest_session; 211 return is_guest_session;
211 #else 212 #else
212 return GetPath() == ProfileManager::GetGuestProfilePath(); 213 return GetPath() == ProfileManager::GetGuestProfilePath();
213 #endif 214 #endif
214 } 215 }
215 216
216 bool Profile::IsNewProfile() { 217 bool Profile::IsNewProfile() {
217 // The profile has been shut down if the prefs were loaded from disk, unless 218 // The profile has been shut down if the prefs were loaded from disk, unless
218 // first-run autoimport wrote them and reloaded the pref service. 219 // first-run autoimport wrote them and reloaded the pref service.
219 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile 220 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile
(...skipping 29 matching lines...) Expand all
249 if (a->IsSameProfile(b)) 250 if (a->IsSameProfile(b))
250 return false; 251 return false;
251 return a->GetOriginalProfile() < b->GetOriginalProfile(); 252 return a->GetOriginalProfile() < b->GetOriginalProfile();
252 } 253 }
253 254
254 double Profile::GetDefaultZoomLevelForProfile() { 255 double Profile::GetDefaultZoomLevelForProfile() {
255 return GetDefaultStoragePartition(this) 256 return GetDefaultStoragePartition(this)
256 ->GetHostZoomMap() 257 ->GetHostZoomMap()
257 ->GetDefaultZoomLevel(); 258 ->GetDefaultZoomLevel();
258 } 259 }
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_win.cc ('k') | chrome/browser/profiles/profile_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698