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

Side by Side Diff: components/previews/core/previews_experiments.h

Issue 2640023007: Adds PreviewsType version mechanism for clearing blacklist entries. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ 5 #ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
6 #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ 6 #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
7 7
8 #include <vector>
9
8 #include "base/time/time.h" 10 #include "base/time/time.h"
9 11
10 namespace previews { 12 namespace previews {
11 13
12 namespace params { 14 namespace params {
13 15
14 // The maximum number of recent previews navigations the black list looks at to 16 // The maximum number of recent previews navigations the black list looks at to
15 // determine if a host is blacklisted. 17 // determine if a host is blacklisted.
16 size_t MaxStoredHistoryLengthForPerHostBlackList(); 18 size_t MaxStoredHistoryLengthForPerHostBlackList();
17 19
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 LAST = 2, 53 LAST = 2,
52 }; 54 };
53 55
54 // Returns true if any client-side previews experiment is active. 56 // Returns true if any client-side previews experiment is active.
55 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); 57 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial();
56 58
57 // Returns true if the field trial that should enable previews for |type| for 59 // Returns true if the field trial that should enable previews for |type| for
58 // prohibitvely slow networks is active. 60 // prohibitvely slow networks is active.
59 bool IsPreviewsTypeEnabled(PreviewsType type); 61 bool IsPreviewsTypeEnabled(PreviewsType type);
60 62
63 // Returns the enabled PreviewsTypes with their version.
64 // Caller assumes ownership of returned vector.
tbansal1 2017/01/23 20:06:11 In Chromium, if a function returns raw ptr, the de
dougarnett 2017/01/24 00:52:38 Done.
65 std::vector<std::pair<PreviewsType, int>>* GetEnabledPreviews();
66
61 // Sets the appropriate state for field trial and variations to imitate the 67 // Sets the appropriate state for field trial and variations to imitate the
62 // offline pages field trial. 68 // offline pages field trial.
63 bool EnableOfflinePreviewsForTesting(); 69 bool EnableOfflinePreviewsForTesting();
64 70
65 } // namespace previews 71 } // namespace previews
66 72
67 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ 73 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698