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

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

Issue 2845035: First change to add safebrowsing service test. ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_browsertest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
7 7
8 // A class that implements Chrome's interface with the SafeBrowsing protocol. 8 // A class that implements Chrome's interface with the SafeBrowsing protocol.
9 // The SafeBrowsingProtocolManager handles formatting and making requests of, 9 // The SafeBrowsingProtocolManager handles formatting and making requests of,
10 // and handling responses from, Google's SafeBrowsing servers. This class uses 10 // and handling responses from, Google's SafeBrowsing servers. This class uses
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestBackOffTimes); 47 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestBackOffTimes);
48 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestChunkStrings); 48 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestChunkStrings);
49 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestGetHashUrl); 49 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestGetHashUrl);
50 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, 50 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest,
51 TestGetHashBackOffTimes); 51 TestGetHashBackOffTimes);
52 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestMacKeyUrl); 52 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestMacKeyUrl);
53 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, 53 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest,
54 TestMalwareReportUrl); 54 TestMalwareReportUrl);
55 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestNextChunkUrl); 55 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestNextChunkUrl);
56 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestUpdateUrl); 56 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestUpdateUrl);
57 friend class SafeBrowsingServiceTest;
57 58
58 public: 59 public:
59 // Constructs a SafeBrowsingProtocolManager for |sb_service| that issues 60 // Constructs a SafeBrowsingProtocolManager for |sb_service| that issues
60 // network requests using |request_context_getter|. When |disable_auto_update| 61 // network requests using |request_context_getter|. When |disable_auto_update|
61 // is true, protocol manager won't schedule next update until 62 // is true, protocol manager won't schedule next update until
62 // ForceScheduleNextUpdate is called. 63 // ForceScheduleNextUpdate is called.
63 SafeBrowsingProtocolManager(SafeBrowsingService* sb_service, 64 SafeBrowsingProtocolManager(SafeBrowsingService* sb_service,
64 const std::string& client_name, 65 const std::string& client_name,
65 const std::string& client_key, 66 const std::string& client_key,
66 const std::string& wrapped_key, 67 const std::string& wrapped_key,
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 std::string mackey_url_prefix_; 310 std::string mackey_url_prefix_;
310 311
311 // When true, protocol manager will not start an update unless 312 // When true, protocol manager will not start an update unless
312 // ForceScheduleNextUpdate() is called. This is set for testing purpose. 313 // ForceScheduleNextUpdate() is called. This is set for testing purpose.
313 bool disable_auto_update_; 314 bool disable_auto_update_;
314 315
315 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager); 316 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingProtocolManager);
316 }; 317 };
317 318
318 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 319 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698