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 #include "chrome/browser/metrics/variations/variations_service.h" | 5 #include "chrome/browser/metrics/variations/variations_service.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/build_time.h" | 9 #include "base/build_time.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
600 } | 600 } |
601 | 601 |
602 void VariationsService::RecordLastFetchTime() { | 602 void VariationsService::RecordLastFetchTime() { |
603 // local_state_ is NULL in tests, so check it first. | 603 // local_state_ is NULL in tests, so check it first. |
604 if (local_state_) { | 604 if (local_state_) { |
605 local_state_->SetInt64(prefs::kVariationsLastFetchTime, | 605 local_state_->SetInt64(prefs::kVariationsLastFetchTime, |
606 base::Time::Now().ToInternalValue()); | 606 base::Time::Now().ToInternalValue()); |
607 } | 607 } |
608 } | 608 } |
609 | 609 |
610 void VariationsService::OnDelayedSendIncidentReport( | |
grt (UTC plus 2)
2014/10/10 17:45:42
rather than embed a dependency on safe_browsing he
Georges Khalil
2014/10/10 20:19:31
Agreed, modified the code to reflect this change.
| |
611 const safe_browsing::AddIncidentCallback& callback) { | |
612 if (!seed_store_.GetBadSignature().empty()) { | |
613 scoped_ptr<safe_browsing::ClientIncidentReport_IncidentData> incident_data( | |
614 new safe_browsing::ClientIncidentReport_IncidentData()); | |
615 safe_browsing:: | |
616 ClientIncidentReport_IncidentData_FinchConfigSignatureIncident* | |
617 finch_config_signature = | |
618 incident_data->mutable_finch_config_signature(); | |
619 finch_config_signature->set_signature_hash(seed_store_.GetBadSignature()); | |
620 callback.Run(incident_data.Pass()); | |
621 } | |
622 } | |
623 | |
610 } // namespace chrome_variations | 624 } // namespace chrome_variations |
OLD | NEW |