Chromium Code Reviews| Index: chrome/browser/safe_browsing/client_side_detection_service.cc |
| diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc |
| index 3d55132c39d1cc8c174f63b5d191886bf2c83f35..6ddcb8e1ec7865558a2f096a6d0a260e10f86915 100644 |
| --- a/chrome/browser/safe_browsing/client_side_detection_service.cc |
| +++ b/chrome/browser/safe_browsing/client_side_detection_service.cc |
| @@ -15,14 +15,21 @@ |
| #include "base/stl_util-inl.h" |
| #include "base/task.h" |
| #include "base/time.h" |
| +#include "chrome/browser/browser_process.h" |
| #include "chrome/browser/browser_thread.h" |
| +#include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| #include "chrome/browser/safe_browsing/csd.pb.h" |
| +#include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| +#include "chrome/browser/tab_contents/tab_contents.h" |
| +#include "chrome/browser/tab_contents/tab_util.h" |
| +#include "chrome/common/chrome_switches.h" |
|
lzheng
2011/02/11 19:39:42
Is this used somewhere? You might want to double c
noelutz
2011/02/15 23:00:55
Done.
|
| #include "chrome/common/net/http_return.h" |
| #include "chrome/common/net/url_fetcher.h" |
| #include "chrome/common/net/url_request_context_getter.h" |
| #include "googleurl/src/gurl.h" |
| #include "net/base/load_flags.h" |
| #include "net/url_request/url_request_status.h" |
| +#include "webkit/glue/resource_type.h" |
| namespace safe_browsing { |
| @@ -49,6 +56,15 @@ ClientSideDetectionService::ClientSideDetectionService( |
| request_context_getter_(request_context_getter) { |
| } |
| +ClientSideDetectionService::ClientSideDetectionService() |
| + : model_path_(), |
|
Brian Ryner
2011/02/11 01:30:39
As I mentioned on another CL, I'm kind of concerne
noelutz
2011/02/15 23:00:55
Done.
|
| + model_status_(UNKNOWN_STATUS), |
| + model_file_(base::kInvalidPlatformFileValue), |
| + ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), |
| + ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)), |
| + request_context_getter_(NULL) { |
| +} |
| + |
| ClientSideDetectionService::~ClientSideDetectionService() { |
| method_factory_.RevokeAll(); |
| STLDeleteContainerPairPointers(client_phishing_reports_.begin(), |
| @@ -311,7 +327,8 @@ void ClientSideDetectionService::HandlePhishingVerdict( |
| info->callback->Run(info->phishing_url, response.phishy()); |
| } else { |
| DLOG(ERROR) << "Unable to get the server verdict for URL: " |
| - << info->phishing_url; |
| + << info->phishing_url << " status: " << status.status() << " " |
| + << "response_code:" << response_code; |
| info->callback->Run(info->phishing_url, false); |
| } |
| client_phishing_reports_.erase(source); |