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

Unified Diff: chrome/browser/metrics/variations/variations_service.cc

Issue 59953005: Store prefs::kVariationsSeedDate on a variations server 304. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/variations/variations_service.cc
===================================================================
--- chrome/browser/metrics/variations/variations_service.cc (revision 232403)
+++ chrome/browser/metrics/variations/variations_service.cc (working copy)
@@ -25,7 +25,6 @@
#include "components/variations/proto/variations_seed.pb.h"
#include "components/variations/variations_seed_processor.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/common/url_fetcher.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/network_change_notifier.h"
@@ -398,6 +397,10 @@
if (response_code == net::HTTP_NOT_MODIFIED) {
UMA_HISTOGRAM_MEDIUM_TIMES("Variations.FetchNotModifiedLatency", latency);
RecordLastFetchTime();
+ // Update the seed date value in local state (used for expiry check on
+ // next start up), since 304 is a successful response.
+ local_state_->SetInt64(prefs::kVariationsSeedDate,
+ response_date.ToInternalValue());
} else {
UMA_HISTOGRAM_MEDIUM_TIMES("Variations.FetchOtherLatency", latency);
}

Powered by Google App Engine
This is Rietveld 408576698