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

Unified Diff: chrome/browser/sessions/better_session_restore_browsertest.cc

Issue 12210067: Get rid of native-desktop-only BrowserList:: iterator methods in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r181832 Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/fast_shutdown_browsertest.cc ('k') | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/better_session_restore_browsertest.cc
diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc
index 7d0ef4e639645df2ba894d7c2c5ac4f9c015bf22..748db0f8eb1c2553761e151ca225824d94544355 100644
--- a/chrome/browser/sessions/better_session_restore_browsertest.cc
+++ b/chrome/browser/sessions/better_session_restore_browsertest.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
-#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/startup/startup_browser_creator.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -46,10 +46,9 @@ namespace {
Browser* FindOneOtherBrowserForProfile(Profile* profile,
Browser* not_this_browser) {
- for (BrowserList::const_iterator i = BrowserList::begin();
- i != BrowserList::end(); ++i) {
- if (*i != not_this_browser && (*i)->profile() == profile)
- return *i;
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) {
+ if (*it != not_this_browser && it->profile() == profile)
+ return *it;
}
return NULL;
}
@@ -369,9 +368,8 @@ class RestartTest : public BetterSessionRestoreTest {
protected:
void Restart() {
// Simluate restarting the browser, but let the test exit peacefully.
- BrowserList::const_iterator it;
- for (it = BrowserList::begin(); it != BrowserList::end(); ++it)
- content::BrowserContext::SaveSessionState((*it)->profile());
+ for (chrome::BrowserIterator it; !it.done(); it.Next())
+ content::BrowserContext::SaveSessionState(it->profile());
PrefService* pref_service = g_browser_process->local_state();
pref_service->SetBoolean(prefs::kWasRestarted, true);
#if defined(OS_WIN)
« no previous file with comments | « chrome/browser/fast_shutdown_browsertest.cc ('k') | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698