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

Unified Diff: chrome/browser/sync/test/integration/typed_urls_helper.cc

Issue 1126633005: Don't create a sync node when updating an URL that wasn't typed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: chrome/browser/sync/test/integration/typed_urls_helper.cc
diff --git a/chrome/browser/sync/test/integration/typed_urls_helper.cc b/chrome/browser/sync/test/integration/typed_urls_helper.cc
index 3df8d88580ca5bfb1df03fcb1f5fbe24f90b24d2..8d4fb866aa88413e9c0c2602d5350e26e59cae93 100644
--- a/chrome/browser/sync/test/integration/typed_urls_helper.cc
+++ b/chrome/browser/sync/test/integration/typed_urls_helper.cc
@@ -169,7 +169,6 @@ void AddToHistory(history::HistoryService* service,
transition,
source,
false);
- service->SetPageTitle(url, base::ASCIIToUTF16(url.spec() + " - title"));
}
history::URLRows GetTypedUrlsFromHistoryService(
@@ -332,6 +331,16 @@ void DeleteUrlsFromHistory(int index, const std::vector<GURL>& urls) {
WaitForHistoryDBThread(index);
}
+void SetPageTitle(int index, const GURL& url, const std::string& title) {
+ HistoryServiceFactory::GetForProfileWithoutCreating(test()->GetProfile(index))
+ ->SetPageTitle(url, base::UTF8ToUTF16(title));
+ if (test()->use_verifier())
+ HistoryServiceFactory::GetForProfile(test()->verifier(),
+ ServiceAccessType::IMPLICIT_ACCESS)
+ ->SetPageTitle(url, base::UTF8ToUTF16(title));
+ WaitForHistoryDBThread(index);
+}
+
bool CheckURLRowVectorsAreEqual(const history::URLRows& left,
const history::URLRows& right) {
if (left.size() != right.size())

Powered by Google App Engine
This is Rietveld 408576698