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

Unified Diff: net/tools/testserver/chromiumsync.py

Issue 10235013: [Sync] Add support for automatic enabling of syncing tab favicons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 8 years, 8 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: net/tools/testserver/chromiumsync.py
diff --git a/net/tools/testserver/chromiumsync.py b/net/tools/testserver/chromiumsync.py
index d789bcbbc653e6a1d46f8452d914e493f27f926c..2a956643048980c77262ae42b5962b65eb873940 100644
--- a/net/tools/testserver/chromiumsync.py
+++ b/net/tools/testserver/chromiumsync.py
@@ -935,6 +935,21 @@ class SyncDataModel(object):
nigori_new.specifics.nigori.sync_tabs = True
self._SaveEntry(nigori_new)
+ def TriggerSyncTabFavicons(self):
+ """Set the 'sync_tab_favicons' field to this account's nigori node.
+
+ If the field is not currently set, will write a new nigori node entry
+ with the field set. Else does nothing.
+ """
+
+ nigori_tag = "google_chrome_nigori"
+ nigori_original = self._entries.get(self._ServerTagToId(nigori_tag))
+ if (nigori_original.specifics.nigori.sync_tab_favicons):
+ return
+ nigori_new = copy.deepcopy(nigori_original)
+ nigori_new.specifics.nigori.sync_tab_favicons = True
+ self._SaveEntry(nigori_new)
+
def TriggerCreateSyncedBookmarks(self):
"""Create the Synced Bookmarks folder under the Bookmarks permanent item.
@@ -1096,6 +1111,14 @@ class TestServer(object):
200,
'<html><title>Sync Tabs</title><H1>Sync Tabs</H1></html>')
+ def HandleSetSyncTabFavicons(self):
+ """Set the 'sync_tab_favicons' field of the nigori node for this account."""
+ self.account.TriggerSyncTabFavicons()
+ return (
+ 200,
+ '<html><title>Sync Tabs Favicons</title> '
+ '<H1>Sync Tab Favicons</H1></html>')
+
def HandleCreateSyncedBookmarks(self):
"""Create the Synced Bookmarks folder under Bookmarks."""
self.account.TriggerCreateSyncedBookmarks()

Powered by Google App Engine
This is Rietveld 408576698