| OLD | NEW | 
|    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  Loading... | 
|  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 | 
| OLD | NEW |