| OLD | NEW |
| 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 <string> |
| 8 #include <utility> | 9 #include <utility> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 12 #include "net/nqe/effective_connection_type.h" | 13 #include "net/nqe/effective_connection_type.h" |
| 13 | 14 |
| 14 namespace previews { | 15 namespace previews { |
| 15 | 16 |
| 16 namespace params { | 17 namespace params { |
| 17 | 18 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 72 |
| 72 enum class PreviewsType { | 73 enum class PreviewsType { |
| 73 NONE = 0, | 74 NONE = 0, |
| 74 | 75 |
| 75 // The user is shown an offline page as a preview. | 76 // The user is shown an offline page as a preview. |
| 76 OFFLINE = 1, | 77 OFFLINE = 1, |
| 77 | 78 |
| 78 // Replace images with placeholders generated on the client. | 79 // Replace images with placeholders generated on the client. |
| 79 CLIENT_LOFI = 2, | 80 CLIENT_LOFI = 2, |
| 80 | 81 |
| 82 // The user is shown a server lite page. |
| 83 LITE_PAGE = 3, |
| 84 |
| 85 // The user is shown a server LoFi page. |
| 86 SERVER_LOFI = 4, |
| 87 |
| 81 // Insert new enum values here. Keep values sequential to allow looping | 88 // Insert new enum values here. Keep values sequential to allow looping |
| 82 // from NONE+1 to LAST-1. | 89 // from NONE+1 to LAST-1. |
| 83 LAST = 3, | 90 LAST = 5, |
| 84 }; | 91 }; |
| 85 | 92 |
| 86 typedef std::vector<std::pair<PreviewsType, int>> PreviewsTypeList; | 93 typedef std::vector<std::pair<PreviewsType, int>> PreviewsTypeList; |
| 87 | 94 |
| 88 // Returns true if any client-side previews experiment is active. | 95 // Returns true if any client-side previews experiment is active. |
| 89 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); | 96 bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); |
| 90 | 97 |
| 98 // Gets the string representation of |type|. |
| 99 std::string GetStringNameForType(PreviewsType type); |
| 100 |
| 91 } // namespace previews | 101 } // namespace previews |
| 92 | 102 |
| 93 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ | 103 #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ |
| OLD | NEW |