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

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

Issue 1408643002: [Sync] Componentize synced_tab_delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test broken by rebase 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_session_util.cc
diff --git a/chrome/browser/sync/glue/synced_session_util.cc b/chrome/browser/sync/glue/synced_session_util.cc
deleted file mode 100644
index 60fa59c4b08b1959b5ef3c33f3281c491dd1b3ec..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/glue/synced_session_util.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015 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.
-
-#include "chrome/browser/sync/glue/synced_session_util.h"
-
-#include "chrome/common/url_constants.h"
-#include "components/sessions/core/session_types.h"
-#include "content/public/common/url_constants.h"
-
-namespace browser_sync {
-
-// Note: chrome:// and file:// are not considered valid urls (for syncing).
-bool ShouldSyncURL(const GURL& url) {
- return url.is_valid() && !url.SchemeIs(content::kChromeUIScheme) &&
- !url.SchemeIs(chrome::kChromeNativeScheme) && !url.SchemeIsFile();
-}
-
-bool ShouldSyncSessionTab(const sessions::SessionTab& tab) {
- for (auto&& navigation : tab.navigations) {
- if (ShouldSyncURL(navigation.virtual_url())) {
- return true;
- }
- }
- return false;
-}
-
-bool ShouldSyncSessionWindow(const sessions::SessionWindow& window) {
- for (auto* tab : window.tabs) {
- if (ShouldSyncSessionTab(*tab)) {
- return true;
- }
- }
- return false;
-}
-
-} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698