Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
|
Nathan Parker
2016/01/20 23:26:54
This points to a different file, not one that you'
vakh (use Gerrit instead)
2016/01/21 01:36:46
chrome/browser/safe_browsing/safe_browsing_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 Loading... | |
| 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_ |
| OLD | NEW |