OLD | NEW |
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 // Parse the data returned from the SafeBrowsing v2.1 protocol response. | 5 // Parse the data returned from the SafeBrowsing v2.1 protocol response. |
6 | 6 |
| 7 #include <stdlib.h> |
| 8 |
7 #include "chrome/browser/safe_browsing/protocol_parser.h" | 9 #include "chrome/browser/safe_browsing/protocol_parser.h" |
8 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 10 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
9 | 11 |
10 #include "build/build_config.h" | 12 #include "build/build_config.h" |
11 | 13 |
12 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
13 #include <Winsock2.h> | 15 #include <Winsock2.h> |
14 #elif defined(OS_POSIX) | 16 #elif defined(OS_POSIX) |
15 #include <arpa/inet.h> | 17 #include <arpa/inet.h> |
16 #endif | 18 #endif |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 488 |
487 data += line.size() + 1; | 489 data += line.size() + 1; |
488 remaining -= static_cast<int>(line.size()) + 1; | 490 remaining -= static_cast<int>(line.size()) + 1; |
489 } | 491 } |
490 | 492 |
491 if (client_key->empty() || wrapped_key->empty()) | 493 if (client_key->empty() || wrapped_key->empty()) |
492 return false; | 494 return false; |
493 | 495 |
494 return true; | 496 return true; |
495 } | 497 } |
OLD | NEW |