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

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

Issue 22243002: GTTF: Enable glibcxx debug mode for Debug builds by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_iterator.h ('k') | chrome/common/extensions/extension_set.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/browser_iterator.h" 5 #include "chrome/browser/ui/browser_iterator.h"
6 6
7 namespace chrome { 7 namespace chrome {
8 8
9 BrowserIterator::BrowserIterator() 9 BrowserIterator::BrowserIterator()
10 : current_browser_list_(BrowserList::GetInstance(HOST_DESKTOP_TYPE_FIRST)), 10 : current_browser_list_(BrowserList::GetInstance(HOST_DESKTOP_TYPE_FIRST)),
11 current_iterator_(current_browser_list_->begin()), 11 current_iterator_(current_browser_list_->begin()),
12 next_desktop_type_( 12 next_desktop_type_(
13 static_cast<HostDesktopType>(HOST_DESKTOP_TYPE_FIRST + 1)) { 13 static_cast<HostDesktopType>(HOST_DESKTOP_TYPE_FIRST + 1)) {
14 NextBrowserListIfAtEnd(); 14 NextBrowserListIfAtEnd();
15 } 15 }
16 16
17 BrowserIterator::~BrowserIterator() {
18 }
19
17 void BrowserIterator::Next() { 20 void BrowserIterator::Next() {
18 ++current_iterator_; 21 ++current_iterator_;
19 NextBrowserListIfAtEnd(); 22 NextBrowserListIfAtEnd();
20 } 23 }
21 24
22 void BrowserIterator::NextBrowserListIfAtEnd() { 25 void BrowserIterator::NextBrowserListIfAtEnd() {
23 // Make sure either |current_iterator_| is valid or done(). 26 // Make sure either |current_iterator_| is valid or done().
24 while (current_iterator_ == current_browser_list_->end() && 27 while (current_iterator_ == current_browser_list_->end() &&
25 next_desktop_type_ < HOST_DESKTOP_TYPE_COUNT) { 28 next_desktop_type_ < HOST_DESKTOP_TYPE_COUNT) {
26 current_browser_list_ = BrowserList::GetInstance(next_desktop_type_); 29 current_browser_list_ = BrowserList::GetInstance(next_desktop_type_);
27 current_iterator_ = current_browser_list_->begin(); 30 current_iterator_ = current_browser_list_->begin();
28 next_desktop_type_ = static_cast<HostDesktopType>(next_desktop_type_ + 1); 31 next_desktop_type_ = static_cast<HostDesktopType>(next_desktop_type_ + 1);
29 } 32 }
30 } 33 }
31 34
32 } // namespace chrome 35 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_iterator.h ('k') | chrome/common/extensions/extension_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698