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

Side by Side Diff: components/safe_browsing_db/safe_browsing_api_handler_util.h

Issue 1579403002: Move remote_db_manager into the safe_browsing_db component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define a variable for safe_browsing_db_mobile_unittest_sources Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // Helper functions for SafeBrowsingApiHandlerImpl. Separated out for tests. 5 // Helper functions for SafeBrowsingApiHandlerImpl. Separated out for tests.
6 6
7 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_API_HANDLER_UTIL_H_ 7 #ifndef COMPONENTS_SAFE_BROWSING_DB_SAFE_BROWSING_API_HANDLER_UTIL_H_
8 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_API_HANDLER_UTIL_H_ 8 #define COMPONENTS_SAFE_BROWSING_DB_SAFE_BROWSING_API_HANDLER_UTIL_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "chrome/browser/safe_browsing/safe_browsing_util.h" 12 #include "components/safe_browsing_db/util.h"
13 13
14 namespace safe_browsing { 14 namespace safe_browsing {
15 15
16 // These match what SafeBrowsingApiHandler.java uses for |resultStatus| 16 // These match what SafeBrowsingApiHandler.java uses for |resultStatus|
17 enum RemoteCallResultStatus { 17 enum RemoteCallResultStatus {
18 RESULT_STATUS_INTERNAL_ERROR = -1, 18 RESULT_STATUS_INTERNAL_ERROR = -1,
19 RESULT_STATUS_SUCCESS = 0, 19 RESULT_STATUS_SUCCESS = 0,
20 RESULT_STATUS_TIMEOUT = 1, 20 RESULT_STATUS_TIMEOUT = 1,
21 }; 21 };
22 22
(...skipping 25 matching lines...) Expand all
48 // is binary compatible with the Pver3 API's metadata string even 48 // is binary compatible with the Pver3 API's metadata string even
49 // though it comes from Pver4. 49 // though it comes from Pver4.
50 // 50 //
51 // If anything fails to parse, this sets the threat to "safe". The caller 51 // If anything fails to parse, this sets the threat to "safe". The caller
52 // should report the return value via UMA. 52 // should report the return value via UMA.
53 UmaRemoteCallResult ParseJsonToThreatAndPB(const std::string& metadata_str, 53 UmaRemoteCallResult ParseJsonToThreatAndPB(const std::string& metadata_str,
54 SBThreatType* worst_threat, 54 SBThreatType* worst_threat,
55 std::string* metadata_pb_str); 55 std::string* metadata_pb_str);
56 } // namespace safe_browsing 56 } // namespace safe_browsing
57 57
58 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_API_HANDLER_UTIL_H_ 58 #endif // COMPONENTS_SAFE_BROWSING_DB_SAFE_BROWSING_API_HANDLER_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698