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

Unified Diff: chrome/browser/sync/glue/synced_tab_delegate.cc

Issue 1309323004: Create a NavigationEntry for the initial blank page. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GetEntryCount, more tests Created 5 years, 2 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/glue/synced_tab_delegate.cc
diff --git a/chrome/browser/sync/glue/synced_tab_delegate.cc b/chrome/browser/sync/glue/synced_tab_delegate.cc
index 4d51259eb35b355f52eced7faedcb3b0e8a9fae1..54fde076b003dca61875b86fb6f97668a7731ee2 100644
--- a/chrome/browser/sync/glue/synced_tab_delegate.cc
+++ b/chrome/browser/sync/glue/synced_tab_delegate.cc
@@ -36,10 +36,10 @@ bool SyncedTabDelegate::ShouldSync() const {
if (ProfileIsSupervised() && GetBlockedNavigations()->size() > 0)
return true;
- int entry_count = GetEntryCount();
- if (entry_count == 0)
+ if (IsInitialBlankNavigation())
return false; // This deliberately ignores a new pending entry.
+ int entry_count = GetEntryCount();
bool found_valid_url = false;
for (int i = 0; i < entry_count; ++i) {
const content::NavigationEntry* entry = GetEntryAtIndexMaybePending(i);
« no previous file with comments | « chrome/browser/sync/glue/synced_tab_delegate.h ('k') | chrome/browser/sync/glue/synced_tab_delegate_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698