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

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

Issue 117533002: [Mac] Redesign of the avatar menu button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: now with less incorrect usage of initializers Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profiles_state.h" 5 #include "chrome/browser/profiles/profiles_state.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/prefs/pref_registry_simple.h" 8 #include "base/prefs/pref_registry_simple.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // the primary account too, so we need to remove it from the list. 113 // the primary account too, so we need to remove it from the list.
114 std::vector<std::string>::iterator primary_index = 114 std::vector<std::string>::iterator primary_index =
115 std::find_if(accounts.begin(), accounts.end(), 115 std::find_if(accounts.begin(), accounts.end(),
116 std::bind1st(std::equal_to<std::string>(), primary_account)); 116 std::bind1st(std::equal_to<std::string>(), primary_account));
117 DCHECK(primary_index != accounts.end()); 117 DCHECK(primary_index != accounts.end());
118 accounts.erase(primary_index); 118 accounts.erase(primary_index);
119 119
120 return accounts; 120 return accounts;
121 } 121 }
122 122
123 bool IsRegularOrGuestSession(Browser* browser) {
124 Profile* profile = browser->profile();
125 return profile->IsGuestSession() || !profile->IsOffTheRecord();
126 }
127
123 } // namespace profiles 128 } // namespace profiles
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698