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

Unified Diff: chrome/browser/history/history_browsertest.cc

Issue 10831103: Removing usage of profile_->GetHistory() from the codebase in order to remove that function. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « no previous file | chrome/browser/predictors/autocomplete_action_predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_browsertest.cc
===================================================================
--- chrome/browser/history/history_browsertest.cc (revision 149452)
+++ chrome/browser/history/history_browsertest.cc (working copy)
@@ -158,11 +158,13 @@
IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryEnabled) {
EXPECT_FALSE(GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled));
- EXPECT_TRUE(GetProfile()->GetHistoryService(Profile::EXPLICIT_ACCESS));
- EXPECT_TRUE(GetProfile()->GetHistoryService(Profile::IMPLICIT_ACCESS));
+ EXPECT_TRUE(HistoryServiceFactory::GetForProfile(
+ GetProfile(), Profile::EXPLICIT_ACCESS));
+ EXPECT_TRUE(HistoryServiceFactory::GetForProfile(
+ GetProfile(), Profile::IMPLICIT_ACCESS));
- ui_test_utils::WaitForHistoryToLoad(
- browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS));
+ ui_test_utils::WaitForHistoryToLoad(HistoryServiceFactory::GetForProfile(
+ browser()->profile(), Profile::EXPLICIT_ACCESS));
ExpectEmptyHistory();
ui_test_utils::NavigateToURL(browser(), GetTestUrl());
@@ -179,11 +181,13 @@
IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryDisabled) {
GetPrefs()->SetBoolean(prefs::kSavingBrowserHistoryDisabled, true);
- EXPECT_TRUE(GetProfile()->GetHistoryService(Profile::EXPLICIT_ACCESS));
- EXPECT_FALSE(GetProfile()->GetHistoryService(Profile::IMPLICIT_ACCESS));
+ EXPECT_TRUE(HistoryServiceFactory::GetForProfile(
+ GetProfile(), Profile::EXPLICIT_ACCESS));
+ EXPECT_FALSE(HistoryServiceFactory::GetForProfile(
+ GetProfile(), Profile::IMPLICIT_ACCESS));
- ui_test_utils::WaitForHistoryToLoad(
- browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS));
+ ui_test_utils::WaitForHistoryToLoad(HistoryServiceFactory::GetForProfile(
+ browser()->profile(), Profile::EXPLICIT_ACCESS));
ExpectEmptyHistory();
ui_test_utils::NavigateToURL(browser(), GetTestUrl());
@@ -196,8 +200,8 @@
IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryEnabledThenDisabled) {
EXPECT_FALSE(GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled));
- ui_test_utils::WaitForHistoryToLoad(
- browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS));
+ ui_test_utils::WaitForHistoryToLoad(HistoryServiceFactory::GetForProfile(
+ browser()->profile(), Profile::EXPLICIT_ACCESS));
ui_test_utils::NavigateToURL(browser(), GetTestUrl());
WaitForHistoryBackendToRun();
@@ -226,8 +230,8 @@
IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryDisabledThenEnabled) {
GetPrefs()->SetBoolean(prefs::kSavingBrowserHistoryDisabled, true);
- ui_test_utils::WaitForHistoryToLoad(
- browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS));
+ ui_test_utils::WaitForHistoryToLoad(HistoryServiceFactory::GetForProfile(
+ browser()->profile(), Profile::EXPLICIT_ACCESS));
ExpectEmptyHistory();
ui_test_utils::NavigateToURL(browser(), GetTestUrl());
« no previous file with comments | « no previous file | chrome/browser/predictors/autocomplete_action_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698