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

Side by Side Diff: chrome/browser/ui/browser_list.cc

Issue 853743002: First pass at fixing guest browser cookies issue. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete the Profile Manager. Guest Profile doesn't write to autocomplete/history. Views still needs … Created 5 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | ui/app_list/app_list_model.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/ui/browser_list.h" 5 #include "chrome/browser/ui/browser_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 bool BrowserList::IsOffTheRecordSessionActive() { 208 bool BrowserList::IsOffTheRecordSessionActive() {
209 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 209 for (chrome::BrowserIterator it; !it.done(); it.Next()) {
210 if (it->profile()->IsOffTheRecord()) 210 if (it->profile()->IsOffTheRecord())
211 return true; 211 return true;
212 } 212 }
213 return false; 213 return false;
214 } 214 }
215 215
216 // static 216 // static
217 bool BrowserList::IsOffTheRecordSessionActiveForProfile(Profile* profile) { 217 bool BrowserList::IsOffTheRecordSessionActiveForProfile(Profile* profile) {
218 if (profile->IsGuestSession())
219 return true;
220 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 218 for (chrome::BrowserIterator it; !it.done(); it.Next()) {
221 if (it->profile()->IsSameProfile(profile) && 219 if (it->profile()->IsSameProfile(profile) &&
222 it->profile()->IsOffTheRecord()) { 220 it->profile()->IsOffTheRecord()) {
223 return true; 221 return true;
224 } 222 }
225 } 223 }
226 return false; 224 return false;
227 } 225 }
228 226
229 //////////////////////////////////////////////////////////////////////////////// 227 ////////////////////////////////////////////////////////////////////////////////
230 // BrowserList, private: 228 // BrowserList, private:
231 229
232 BrowserList::BrowserList() { 230 BrowserList::BrowserList() {
233 } 231 }
234 232
235 BrowserList::~BrowserList() { 233 BrowserList::~BrowserList() {
236 } 234 }
237 235
238 // static 236 // static
239 void BrowserList::RemoveBrowserFrom(Browser* browser, 237 void BrowserList::RemoveBrowserFrom(Browser* browser,
240 BrowserVector* browser_list) { 238 BrowserVector* browser_list) {
241 BrowserVector::iterator remove_browser = 239 BrowserVector::iterator remove_browser =
242 std::find(browser_list->begin(), browser_list->end(), browser); 240 std::find(browser_list->begin(), browser_list->end(), browser);
243 if (remove_browser != browser_list->end()) 241 if (remove_browser != browser_list->end())
244 browser_list->erase(remove_browser); 242 browser_list->erase(remove_browser);
245 } 243 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | ui/app_list/app_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698