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

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

Issue 1726403006: Switch Safe Browsing's metadata from string to struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ParseJson in test Created 4 years, 10 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 // Safe Browsing Database Manager implementation that manages a local 5 // Safe Browsing Database Manager implementation that manages a local
6 // database. This is used by Desktop Chromium. 6 // database. This is used by Desktop Chromium.
7 7
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ 9 #define CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ~SafeBrowsingCheck(); 65 ~SafeBrowsingCheck();
66 66
67 // Either |urls| or |full_hashes| is used to lookup database. |*_results| 67 // Either |urls| or |full_hashes| is used to lookup database. |*_results|
68 // are parallel vectors containing the results. They are initialized to 68 // are parallel vectors containing the results. They are initialized to
69 // contain SB_THREAT_TYPE_SAFE. 69 // contain SB_THREAT_TYPE_SAFE.
70 // |url_hit_hash| and |url_metadata| are parallel vectors containing full 70 // |url_hit_hash| and |url_metadata| are parallel vectors containing full
71 // hash and metadata of a database record provided the result. They are 71 // hash and metadata of a database record provided the result. They are
72 // initialized to be empty strings. 72 // initialized to be empty strings.
73 std::vector<GURL> urls; 73 std::vector<GURL> urls;
74 std::vector<SBThreatType> url_results; 74 std::vector<SBThreatType> url_results;
75 std::vector<std::string> url_metadata; 75 std::vector<ThreatMetadata> url_metadata;
76 std::vector<std::string> url_hit_hash; 76 std::vector<std::string> url_hit_hash;
77 std::vector<SBFullHash> full_hashes; 77 std::vector<SBFullHash> full_hashes;
78 std::vector<SBThreatType> full_hash_results; 78 std::vector<SBThreatType> full_hash_results;
79 79
80 SafeBrowsingDatabaseManager::Client* client; 80 SafeBrowsingDatabaseManager::Client* client;
81 bool is_extended_reporting; 81 bool is_extended_reporting;
82 bool need_get_hash; 82 bool need_get_hash;
83 base::TimeTicks start; // When check was sent to SB service. 83 base::TimeTicks start; // When check was sent to SB service.
84 ListType check_type; // See comment in constructor. 84 ListType check_type; // See comment in constructor.
85 std::vector<SBThreatType> expected_threats; 85 std::vector<SBThreatType> expected_threats;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 // Timeout to use for safe browsing checks. 378 // Timeout to use for safe browsing checks.
379 base::TimeDelta check_timeout_; 379 base::TimeDelta check_timeout_;
380 380
381 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager); 381 DISALLOW_COPY_AND_ASSIGN(LocalSafeBrowsingDatabaseManager);
382 }; // class LocalSafeBrowsingDatabaseManager 382 }; // class LocalSafeBrowsingDatabaseManager
383 383
384 } // namespace safe_browsing 384 } // namespace safe_browsing
385 385
386 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_ 386 #endif // CHROME_BROWSER_SAFE_BROWSING_LOCAL_DATABASE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/safe_browsing_resource_throttle.cc ('k') | chrome/browser/safe_browsing/protocol_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698