OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/extensions/test_blacklist_state_fetcher.h" | 5 #include "chrome/browser/extensions/test_blacklist_state_fetcher.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "net/url_request/url_request_test_util.h" | 9 #include "net/url_request/url_request_test_util.h" |
10 | 10 |
11 namespace extensions { | 11 namespace extensions { |
12 namespace { | 12 namespace { |
13 | 13 |
14 static const char kUrlPrefix[] = "https://prefix.com/foo"; | 14 static const char kUrlPrefix[] = "https://prefix.com/foo"; |
15 static const char kBackupConnectUrlPrefix[] = "https://alt1-prefix.com/foo"; | 15 static const char kBackupConnectUrlPrefix[] = "https://alt1-prefix.com/foo"; |
16 static const char kBackupHttpUrlPrefix[] = "https://alt2-prefix.com/foo"; | 16 static const char kBackupHttpUrlPrefix[] = "https://alt2-prefix.com/foo"; |
17 static const char kBackupNetworkUrlPrefix[] = "https://alt3-prefix.com/foo"; | 17 static const char kBackupNetworkUrlPrefix[] = "https://alt3-prefix.com/foo"; |
18 static const char kClient[] = "unittest"; | 18 static const char kClient[] = "unittest"; |
19 static const char kAppVer[] = "1.0"; | 19 static const char kAppVer[] = "1.0"; |
20 | 20 |
21 SafeBrowsingProtocolConfig CreateSafeBrowsingProtocolConfig() { | 21 safe_browsing::SafeBrowsingProtocolConfig CreateSafeBrowsingProtocolConfig() { |
22 SafeBrowsingProtocolConfig config; | 22 safe_browsing::SafeBrowsingProtocolConfig config; |
23 config.client_name = kClient; | 23 config.client_name = kClient; |
24 config.url_prefix = kUrlPrefix; | 24 config.url_prefix = kUrlPrefix; |
25 config.backup_connect_error_url_prefix = kBackupConnectUrlPrefix; | 25 config.backup_connect_error_url_prefix = kBackupConnectUrlPrefix; |
26 config.backup_http_error_url_prefix = kBackupHttpUrlPrefix; | 26 config.backup_http_error_url_prefix = kBackupHttpUrlPrefix; |
27 config.backup_network_error_url_prefix = kBackupNetworkUrlPrefix; | 27 config.backup_network_error_url_prefix = kBackupNetworkUrlPrefix; |
28 config.version = kAppVer; | 28 config.version = kAppVer; |
29 return config; | 29 return config; |
30 } | 30 } |
31 | 31 |
32 } // namespace | 32 } // namespace |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 url_fetcher->set_status(net::URLRequestStatus()); | 73 url_fetcher->set_status(net::URLRequestStatus()); |
74 url_fetcher->set_response_code(200); | 74 url_fetcher->set_response_code(200); |
75 url_fetcher->SetResponseString(response_str); | 75 url_fetcher->SetResponseString(response_str); |
76 url_fetcher->delegate()->OnURLFetchComplete(url_fetcher); | 76 url_fetcher->delegate()->OnURLFetchComplete(url_fetcher); |
77 | 77 |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
81 } // namespace extensions | 81 } // namespace extensions |
OLD | NEW |