diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 13:19:05 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 13:19:05 +0000 |
commit | ad2a3ded81c49ee89b44f6b544d21ff617c935bf (patch) | |
tree | e83f889f5b17ad81a5e177008df86a0ae9122e4d /chrome/browser/labs.h | |
parent | c0f2f52ebc9d7b41b79ea203a2cfae272c00b937 (diff) | |
download | chromium_src-ad2a3ded81c49ee89b44f6b544d21ff617c935bf.zip chromium_src-ad2a3ded81c49ee89b44f6b544d21ff617c935bf.tar.gz chromium_src-ad2a3ded81c49ee89b44f6b544d21ff617c935bf.tar.bz2 |
Implement about:labs
Tabpose is currently the only lab on mac, tabs-on-left the only lab on windows. Nothing for linux yet.
BUG=53399
TEST=Go to about:labs. Should have one feature on windows and osx each, none on linux yet. about:labs should not be visible on the stable channel. Labs that were enabled on the dev channel should not be enabled on the stable channel. about:labs in chromeos should still work (they use a different implementation)
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57635
Review URL: http://codereview.chromium.org/3152055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57670 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/labs.h')
-rw-r--r-- | chrome/browser/labs.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/browser/labs.h b/chrome/browser/labs.h new file mode 100644 index 0000000..0c61b95 --- /dev/null +++ b/chrome/browser/labs.h @@ -0,0 +1,37 @@ +// Copyright (c) 2010 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 CHROME_BROWSER_LABS_H_ +#define CHROME_BROWSER_LABS_H_ +#pragma once + +#include <string> + +class CommandLine; +class ListValue; +class Profile; + +// Can't be called "labs", that collides with the C function |labs()|. +namespace about_labs { + +// Returns if Labs is enabled (it isn't on the stable channel). +bool IsEnabled(); + +// Reads the Labs pref from |profile| and adds the commandline flags belonging +// to the active experiments to |command_line|. +void ConvertLabsToSwitches(Profile* profile, CommandLine* command_line); + +// Get a list of all available experiments. The caller owns the result. +ListValue* GetLabsExperimentsData(Profile* profile); + +// Returns true if one of the experiment flags has been flipped since startup. +bool IsRestartNeededToCommitChanges(); + +// Enables or disables the experiment with id |internal_name|. +void SetExperimentEnabled( + Profile* profile, const std::string& internal_name, bool enable); + +} // namespace Labs + +#endif // CHROME_BROWSER_LABS_H_ |