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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 | 94 |
95 // Changing the profile name can invalidate the profile index. | 95 // Changing the profile name can invalidate the profile index. |
96 profile_index = cache.GetIndexOfProfileWithPath(profile_file_path); | 96 profile_index = cache.GetIndexOfProfileWithPath(profile_file_path); |
97 if (profile_index == std::string::npos) | 97 if (profile_index == std::string::npos) |
98 return; | 98 return; |
99 | 99 |
100 cache.SetIsUsingGAIANameOfProfileAtIndex(profile_index, false); | 100 cache.SetIsUsingGAIANameOfProfileAtIndex(profile_index, false); |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
104 bool IsRegularOrGuestSession(Browser* browser) { | |
105 Profile* profile = browser->profile(); | |
106 return (profile->IsGuestSession() || !profile->IsOffTheRecord()); | |
Nico
2014/01/14 03:56:02
nit: no parens
noms (inactive)
2014/01/15 22:07:47
Done.
| |
107 } | |
108 | |
104 } // namespace profiles | 109 } // namespace profiles |
OLD | NEW |