diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-20 22:23:57 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-20 22:23:57 +0000 |
commit | f2bd1a355158798d11b0329ed66ae42102dd101f (patch) | |
tree | 9f183b1948bf67ea2d026afd632fda45a9917a06 /chrome/browser/sync/glue/synced_session.h | |
parent | 757d4e54be105e6979169c71cdfa148a0f59ead8 (diff) | |
download | chromium_src-f2bd1a355158798d11b0329ed66ae42102dd101f.zip chromium_src-f2bd1a355158798d11b0329ed66ae42102dd101f.tar.gz chromium_src-f2bd1a355158798d11b0329ed66ae42102dd101f.tar.bz2 |
[Sync] Cleanup Sessions code and make tab syncability stricter.
We now only consider a tab syncable if it has at least one valid entry, where
valid is true iff the url is valid and the scheme is neither chrome or file.
This avoids syncing tabs with nothing but chrome:// or file:// navigations.
BUG=109301
TEST=unit_tests
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=118198
Review URL: http://codereview.chromium.org/9114015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/synced_session.h')
-rw-r--r-- | chrome/browser/sync/glue/synced_session.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/sync/glue/synced_session.h b/chrome/browser/sync/glue/synced_session.h index 7b00b8f..c4037dd 100644 --- a/chrome/browser/sync/glue/synced_session.h +++ b/chrome/browser/sync/glue/synced_session.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -56,9 +56,9 @@ struct SyncedSession { }; // Control which foreign tabs we're interested in syncing/displaying. Checks -// that the tab has navigations and is not a new tab (url == NTP). -// Note: A new tab page with back/forward history is valid. -bool IsValidSessionTab(const SessionTab& tab); +// that the tab has navigations and contains at least one valid url. +// Note: chrome:// and file:// are not considered valid urls (for syncing). +bool ShouldSyncSessionTab(const SessionTab& tab); // Checks whether the window has tabs to sync. If no tabs to sync, it returns // true, false otherwise. |