diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 00:26:55 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-27 00:26:55 +0000 |
commit | fdf4e2506a6dc6fc6d102e72c58511aa1bcfd9ac (patch) | |
tree | e0d26487de15eebc1e602318d1ccf84e1e07c8bd /sync/util | |
parent | c423cb934ddb53672b4d1b15ede1bece0a715fee (diff) | |
download | chromium_src-fdf4e2506a6dc6fc6d102e72c58511aa1bcfd9ac.zip chromium_src-fdf4e2506a6dc6fc6d102e72c58511aa1bcfd9ac.tar.gz chromium_src-fdf4e2506a6dc6fc6d102e72c58511aa1bcfd9ac.tar.bz2 |
[Sync] Add support for automatic enabling of syncing tab favicons.
We add the sync_tab_favicons field to the nigori node and add support
for automatically enabling the feature when we receive a new nigori node.
Once we do enable the feature, the browser will only start writing favicons
after the next restart.
BUG=92728
TEST=using python testserver to enable sync tab favicons, then restarting.
Review URL: http://codereview.chromium.org/10235013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/util')
-rw-r--r-- | sync/util/experiments.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sync/util/experiments.h b/sync/util/experiments.h new file mode 100644 index 0000000..7cd77af --- /dev/null +++ b/sync/util/experiments.h @@ -0,0 +1,32 @@ +// 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. + +#ifndef SYNC_UTIL_EXPERIMENTS_ +#define SYNC_UTIL_EXPERIMENTS_ +#pragma once + +#include "sync/syncable/model_type.h" + +namespace browser_sync { + +// A structure to hold the enable status of experimental sync features. +struct Experiments { + Experiments() : sync_tabs(false), sync_tab_favicons(false) {} + + bool Matches(const Experiments& rhs) { + return (sync_tabs == rhs.sync_tabs) && + (sync_tab_favicons == rhs.sync_tab_favicons); + } + + // Enable the tab sync (SESSIONS) datatype. + bool sync_tabs; + + // Enable syncing of favicons within tab sync (only has an effect if tab sync + // is already enabled). This takes effect on the next restart. + bool sync_tab_favicons; +}; + +} + +#endif // SYNC_UTIL_EXPERIMENTS_ |