OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IOS_CHROME_BROWSER_EXPERIMENTAL_FLAGS_H_ | 5 #ifndef IOS_CHROME_BROWSER_EXPERIMENTAL_FLAGS_H_ |
6 #define IOS_CHROME_BROWSER_EXPERIMENTAL_FLAGS_H_ | 6 #define IOS_CHROME_BROWSER_EXPERIMENTAL_FLAGS_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 // This file can be empty. Its purpose is to contain the relatively short lived | 10 // This file can be empty. Its purpose is to contain the relatively short lived |
9 // declarations required for experimental flags. | 11 // declarations required for experimental flags. |
10 | 12 |
11 namespace experimental_flags { | 13 namespace experimental_flags { |
12 | 14 |
13 // Whether background crash report upload should generate a local notification. | 15 // Whether background crash report upload should generate a local notification. |
14 bool IsAlertOnBackgroundUploadEnabled(); | 16 bool IsAlertOnBackgroundUploadEnabled(); |
15 | 17 |
16 // Whether the new bookmark collection experience is enabled. | 18 // Whether the new bookmark collection experience is enabled. |
17 bool IsBookmarkCollectionEnabled(); | 19 bool IsBookmarkCollectionEnabled(); |
18 | 20 |
19 // Sets whether or not the field trial for WKWebView should be enabled. This | 21 // Sets whether or not the field trial for WKWebView should be enabled. This |
20 // must be called at most once, and before IsWKWebViewEnabled. If this is never | 22 // must be called at most once, and before IsWKWebViewEnabled. If this is never |
21 // called, IsWKWebViewEnabled will assume ineligibility. | 23 // called, IsWKWebViewEnabled will assume ineligibility. |
22 // Note that an explicit command line flag will ignore this setting; it controls | 24 // Note that an explicit command line flag will ignore this setting; it controls |
23 // only whether the trial state will be checked in the default state. | 25 // only whether the trial state will be checked in the default state. |
24 void SetWKWebViewTrialEligibility(bool eligible); | 26 void SetWKWebViewTrialEligibility(bool eligible); |
25 | 27 |
26 // Whether the lru snapshot cache experiment is enabled. | 28 // Whether the lru snapshot cache experiment is enabled. |
27 bool IsLRUSnapshotCacheEnabled(); | 29 bool IsLRUSnapshotCacheEnabled(); |
28 | 30 |
29 // Whether the app uses WKWebView instead of UIWebView. | 31 // Whether the app uses WKWebView instead of UIWebView. |
30 // The returned value will not change within a given session. | 32 // The returned value will not change within a given session. |
31 bool IsWKWebViewEnabled(); | 33 bool IsWKWebViewEnabled(); |
32 | 34 |
| 35 // Returns a string containing extra params that should be sent along with |
| 36 // omnibox search requests. The returned value contains a leading "&". |
| 37 std::string GetWKWebViewSearchParams(); |
| 38 |
33 // Whether keyboard commands are supported. | 39 // Whether keyboard commands are supported. |
34 bool AreKeyboardCommandsEnabled(); | 40 bool AreKeyboardCommandsEnabled(); |
35 | 41 |
36 // Whether viewing and copying passwords is enabled. | 42 // Whether viewing and copying passwords is enabled. |
37 bool IsViewCopyPasswordsEnabled(); | 43 bool IsViewCopyPasswordsEnabled(); |
38 | 44 |
39 } // namespace experimental_flags | 45 } // namespace experimental_flags |
40 | 46 |
41 #endif // IOS_CHROME_BROWSER_EXPERIMENTAL_FLAGS_H_ | 47 #endif // IOS_CHROME_BROWSER_EXPERIMENTAL_FLAGS_H_ |
OLD | NEW |