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

Side by Side Diff: components/safe_browsing_db/v4_protocol_manager_util.cc

Issue 1869063004: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 #include "components/safe_browsing_db/v4_protocol_manager_util.h" 5 #include "components/safe_browsing_db/v4_protocol_manager_util.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 21 matching lines...) Expand all
32 std::size_t first = std::hash<unsigned int>()(platform_type); 32 std::size_t first = std::hash<unsigned int>()(platform_type);
33 std::size_t second = std::hash<unsigned int>()(threat_entry_type); 33 std::size_t second = std::hash<unsigned int>()(threat_entry_type);
34 std::size_t third = std::hash<unsigned int>()(threat_type); 34 std::size_t third = std::hash<unsigned int>()(threat_type);
35 35
36 std::size_t interim = base::HashInts(first, second); 36 std::size_t interim = base::HashInts(first, second);
37 return base::HashInts(interim, third); 37 return base::HashInts(interim, third);
38 } 38 }
39 39
40 V4ProtocolConfig::V4ProtocolConfig() : disable_auto_update(false) {} 40 V4ProtocolConfig::V4ProtocolConfig() : disable_auto_update(false) {}
41 41
42 V4ProtocolConfig::V4ProtocolConfig(const V4ProtocolConfig& other) = default;
43
42 V4ProtocolConfig::~V4ProtocolConfig() {} 44 V4ProtocolConfig::~V4ProtocolConfig() {}
43 45
44 // static 46 // static
45 // Backoff interval is MIN(((2^(n-1))*15 minutes) * (RAND + 1), 24 hours) where 47 // Backoff interval is MIN(((2^(n-1))*15 minutes) * (RAND + 1), 24 hours) where
46 // n is the number of consecutive errors. 48 // n is the number of consecutive errors.
47 base::TimeDelta V4ProtocolManagerUtil::GetNextBackOffInterval( 49 base::TimeDelta V4ProtocolManagerUtil::GetNextBackOffInterval(
48 size_t* error_count, 50 size_t* error_count,
49 size_t* multiplier) { 51 size_t* multiplier) {
50 DCHECK(multiplier && error_count); 52 DCHECK(multiplier && error_count);
51 (*error_count)++; 53 (*error_count)++;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 prefix.c_str(), method.c_str(), request_base64.c_str(), 101 prefix.c_str(), method.c_str(), request_base64.c_str(),
100 client_id.c_str(), version.c_str()); 102 client_id.c_str(), version.c_str());
101 if (!key_param.empty()) { 103 if (!key_param.empty()) {
102 base::StringAppendF(&url, "&key=%s", 104 base::StringAppendF(&url, "&key=%s",
103 net::EscapeQueryParamValue(key_param, true).c_str()); 105 net::EscapeQueryParamValue(key_param, true).c_str());
104 } 106 }
105 return url; 107 return url;
106 } 108 }
107 109
108 } // namespace safe_browsing 110 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_protocol_manager_util.h ('k') | components/wifi/network_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698