| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 class Profile; | 10 class Profile; |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class CommandLine; | 13 class CommandLine; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace prerender { | 16 namespace prerender { |
| 17 | 17 |
| 18 // Parse the --prerender= command line switch, which controls prerendering. If | 18 // Parse the --prerender= command line switch, which controls prerendering. If |
| 19 // the switch is unset or is set to "auto" then the user is assigned to a | 19 // the switch is unset or is set to "auto" then the user is assigned to a |
| 20 // field trial. | 20 // field trial. |
| 21 void ConfigurePrerender(const base::CommandLine& command_line); | 21 void ConfigurePrerender(const base::CommandLine& command_line); |
| 22 | 22 |
| 23 // Returns true if the user has opted in or has been opted in to the | 23 // Returns true if the user has opted in or has been opted in to the |
| 24 // prerendering from Omnibox experiment. | 24 // prerendering from Omnibox experiment. |
| 25 bool IsOmniboxEnabled(Profile* profile); | 25 bool IsOmniboxEnabled(Profile* profile); |
| 26 | 26 |
| 27 // Returns true if session storage namespace merging is not disabled. | |
| 28 bool ShouldMergeSessionStorageNamespaces(); | |
| 29 | |
| 30 // Returns true iff the Prerender Local Predictor is enabled. | 27 // Returns true iff the Prerender Local Predictor is enabled. |
| 31 bool IsLocalPredictorEnabled(); | 28 bool IsLocalPredictorEnabled(); |
| 32 | 29 |
| 33 // Indicates whether to disable the local predictor due to unencrypted sync | 30 // Indicates whether to disable the local predictor due to unencrypted sync |
| 34 // settings and configuration. | 31 // settings and configuration. |
| 35 bool ShouldDisableLocalPredictorBasedOnSyncAndConfiguration(Profile* profile); | 32 bool ShouldDisableLocalPredictorBasedOnSyncAndConfiguration(Profile* profile); |
| 36 | 33 |
| 37 // Returns whether or not the local predictor is temporarily disabled, due | 34 // Returns whether or not the local predictor is temporarily disabled, due |
| 38 // to network predictive action settings and current network. | 35 // to network predictive action settings and current network. |
| 39 bool ShouldDisableLocalPredictorDueToPreferencesAndNetwork(Profile* profile); | 36 bool ShouldDisableLocalPredictorDueToPreferencesAndNetwork(Profile* profile); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 bool SkipLocalPredictorDefaultNoPrerender(); | 100 bool SkipLocalPredictorDefaultNoPrerender(); |
| 104 bool SkipLocalPredictorLocalCandidates(); | 101 bool SkipLocalPredictorLocalCandidates(); |
| 105 bool SkipLocalPredictorServiceCandidates(); | 102 bool SkipLocalPredictorServiceCandidates(); |
| 106 | 103 |
| 107 // Indicates whether no prerender cookie stores should be used for prerendering. | 104 // Indicates whether no prerender cookie stores should be used for prerendering. |
| 108 bool IsPrerenderCookieStoreEnabled(); | 105 bool IsPrerenderCookieStoreEnabled(); |
| 109 | 106 |
| 110 } // namespace prerender | 107 } // namespace prerender |
| 111 | 108 |
| 112 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ | 109 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ |
| OLD | NEW |