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

Side by Side Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle.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, 9 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/safe_browsing_resource_throttle.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_
6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // content::ResourceThrottle implementation (called on IO thread): 76 // content::ResourceThrottle implementation (called on IO thread):
77 void WillStartRequest(bool* defer) override; 77 void WillStartRequest(bool* defer) override;
78 void WillRedirectRequest(const net::RedirectInfo& redirect_info, 78 void WillRedirectRequest(const net::RedirectInfo& redirect_info,
79 bool* defer) override; 79 bool* defer) override;
80 void WillProcessResponse(bool* defer) override; 80 void WillProcessResponse(bool* defer) override;
81 81
82 const char* GetNameForLogging() const override; 82 const char* GetNameForLogging() const override;
83 83
84 // SafeBrowsingDabaseManager::Client implementation (called on IO thread): 84 // SafeBrowsingDabaseManager::Client implementation (called on IO thread):
85 void OnCheckBrowseUrlResult(const GURL& url, 85 void OnCheckBrowseUrlResult(
86 safe_browsing::SBThreatType result, 86 const GURL& url,
87 const std::string& metadata) override; 87 safe_browsing::SBThreatType result,
88 const safe_browsing::ThreatMetadata& metadata) override;
88 89
89 protected: 90 protected:
90 SafeBrowsingResourceThrottle(const net::URLRequest* request, 91 SafeBrowsingResourceThrottle(const net::URLRequest* request,
91 content::ResourceType resource_type, 92 content::ResourceType resource_type,
92 safe_browsing::SafeBrowsingService* sb_service); 93 safe_browsing::SafeBrowsingService* sb_service);
93 94
94 private: 95 private:
95 // Describes what phase of the check a throttle is in. 96 // Describes what phase of the check a throttle is in.
96 enum State { 97 enum State {
97 // Haven't started checking or checking is complete. Not deferred. 98 // Haven't started checking or checking is complete. Not deferred.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; 174 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_;
174 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; 175 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_;
175 const net::URLRequest* request_; 176 const net::URLRequest* request_;
176 const content::ResourceType resource_type_; 177 const content::ResourceType resource_type_;
177 net::BoundNetLog bound_net_log_; 178 net::BoundNetLog bound_net_log_;
178 179
179 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); 180 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle);
180 }; 181 };
181 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_ 182 #endif // CHROME_BROWSER_RENDERER_HOST_SAFE_BROWSING_RESOURCE_THROTTLE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/safe_browsing_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698