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

Side by Side Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 2317153003: [NTP Snippets] Increase default expiry time to 3 days (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "components/ntp_snippets/ntp_snippets_service.h" 5 #include "components/ntp_snippets/ntp_snippets_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const char kFetchingIntervalWifiParamName[] = 61 const char kFetchingIntervalWifiParamName[] =
62 "fetching_interval_wifi_seconds"; 62 "fetching_interval_wifi_seconds";
63 const char kFetchingIntervalFallbackParamName[] = 63 const char kFetchingIntervalFallbackParamName[] =
64 "fetching_interval_fallback_seconds"; 64 "fetching_interval_fallback_seconds";
65 65
66 // These define the times of day during which we will fetch via Wifi (without 66 // These define the times of day during which we will fetch via Wifi (without
67 // charging) - 6 AM to 10 PM. 67 // charging) - 6 AM to 10 PM.
68 const int kWifiFetchingHourMin = 6; 68 const int kWifiFetchingHourMin = 6;
69 const int kWifiFetchingHourMax = 22; 69 const int kWifiFetchingHourMax = 22;
70 70
71 const int kDefaultExpiryTimeMins = 24 * 60; 71 const int kDefaultExpiryTimeMins = 3 * 24 * 60;
72 72
73 base::TimeDelta GetFetchingInterval(const char* switch_name, 73 base::TimeDelta GetFetchingInterval(const char* switch_name,
74 const char* param_name, 74 const char* param_name,
75 int default_value_seconds) { 75 int default_value_seconds) {
76 int value_seconds = default_value_seconds; 76 int value_seconds = default_value_seconds;
77 77
78 // The default value can be overridden by a variation parameter. 78 // The default value can be overridden by a variation parameter.
79 // TODO(treib,jkrcal): Use GetVariationParamValueByFeature and get rid of 79 // TODO(treib,jkrcal): Use GetVariationParamValueByFeature and get rid of
80 // kStudyName, also in NTPSnippetsFetcher. 80 // kStudyName, also in NTPSnippetsFetcher.
81 std::string param_value_str = variations::GetVariationParamValue( 81 std::string param_value_str = variations::GetVariationParamValue(
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 } 1047 }
1048 1048
1049 NTPSnippetsService::CategoryContent::CategoryContent() = default; 1049 NTPSnippetsService::CategoryContent::CategoryContent() = default;
1050 NTPSnippetsService::CategoryContent::CategoryContent(CategoryContent&&) = 1050 NTPSnippetsService::CategoryContent::CategoryContent(CategoryContent&&) =
1051 default; 1051 default;
1052 NTPSnippetsService::CategoryContent::~CategoryContent() = default; 1052 NTPSnippetsService::CategoryContent::~CategoryContent() = default;
1053 NTPSnippetsService::CategoryContent& NTPSnippetsService::CategoryContent:: 1053 NTPSnippetsService::CategoryContent& NTPSnippetsService::CategoryContent::
1054 operator=(CategoryContent&&) = default; 1054 operator=(CategoryContent&&) = default;
1055 1055
1056 } // namespace ntp_snippets 1056 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698