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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_util.h

Issue 586793003: Safebrowsing: Honor the metadata from malware fullhash results in SB API 3.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes for sky Created 6 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
OLDNEW
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 // Utilities for the SafeBrowsing code. 5 // Utilities for the SafeBrowsing code.
6 6
7 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ 7 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_
8 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ 8 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_
9 9
10 #include <cstring> 10 #include <cstring>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 scoped_ptr<safe_browsing::ChunkData> chunk_data_; 83 scoped_ptr<safe_browsing::ChunkData> chunk_data_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(SBChunkData); 85 DISALLOW_COPY_AND_ASSIGN(SBChunkData);
86 }; 86 };
87 87
88 // Used when we get a gethash response. 88 // Used when we get a gethash response.
89 struct SBFullHashResult { 89 struct SBFullHashResult {
90 SBFullHash hash; 90 SBFullHash hash;
91 // TODO(shess): Refactor to allow ListType here. 91 // TODO(shess): Refactor to allow ListType here.
92 int list_id; 92 int list_id;
93 std::string metadata;
93 }; 94 };
94 95
95 // Caches individual response from GETHASH request. 96 // Caches individual response from GETHASH request.
96 struct SBCachedFullHashResult { 97 struct SBCachedFullHashResult {
97 SBCachedFullHashResult(); 98 SBCachedFullHashResult();
98 explicit SBCachedFullHashResult(const base::Time& in_expire_after); 99 explicit SBCachedFullHashResult(const base::Time& in_expire_after);
99 ~SBCachedFullHashResult(); 100 ~SBCachedFullHashResult();
100 101
101 base::Time expire_after; 102 base::Time expire_after;
102 std::vector<SBFullHashResult> full_hashes; 103 std::vector<SBFullHashResult> full_hashes;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 GURL GeneratePhishingReportUrl(const std::string& report_page, 220 GURL GeneratePhishingReportUrl(const std::string& report_page,
220 const std::string& url_to_report, 221 const std::string& url_to_report,
221 bool is_client_side_detection); 222 bool is_client_side_detection);
222 223
223 SBFullHash StringToSBFullHash(const std::string& hash_in); 224 SBFullHash StringToSBFullHash(const std::string& hash_in);
224 std::string SBFullHashToString(const SBFullHash& hash_out); 225 std::string SBFullHashToString(const SBFullHash& hash_out);
225 226
226 } // namespace safe_browsing_util 227 } // namespace safe_browsing_util
227 228
228 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ 229 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_test.cc ('k') | chrome/browser/safe_browsing/ui_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698