| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 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/safe_browsing/client_side_detection_service.h" |    5 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 
|    6  |    6  | 
|    7 #include "base/bind.h" |    7 #include "base/bind.h" | 
|    8 #include "base/command_line.h" |    8 #include "base/command_line.h" | 
|    9 #include "base/logging.h" |    9 #include "base/logging.h" | 
|   10 #include "base/memory/scoped_ptr.h" |   10 #include "base/memory/scoped_ptr.h" | 
|   11 #include "base/message_loop.h" |   11 #include "base/message_loop.h" | 
|   12 #include "base/metrics/histogram.h" |   12 #include "base/metrics/histogram.h" | 
 |   13 #include "base/prefs/pref_service.h" | 
|   13 #include "base/stl_util.h" |   14 #include "base/stl_util.h" | 
|   14 #include "base/string_util.h" |   15 #include "base/string_util.h" | 
|   15 #include "base/time.h" |   16 #include "base/time.h" | 
|   16 #include "chrome/browser/browser_process.h" |   17 #include "chrome/browser/browser_process.h" | 
|   17 #include "chrome/browser/prefs/pref_service.h" |  | 
|   18 #include "chrome/browser/profiles/profile.h" |   18 #include "chrome/browser/profiles/profile.h" | 
|   19 #include "chrome/common/pref_names.h" |   19 #include "chrome/common/pref_names.h" | 
|   20 #include "chrome/common/safe_browsing/client_model.pb.h" |   20 #include "chrome/common/safe_browsing/client_model.pb.h" | 
|   21 #include "chrome/common/safe_browsing/csd.pb.h" |   21 #include "chrome/common/safe_browsing/csd.pb.h" | 
|   22 #include "chrome/common/safe_browsing/safebrowsing_messages.h" |   22 #include "chrome/common/safe_browsing/safebrowsing_messages.h" | 
|   23 #include "content/public/browser/browser_thread.h" |   23 #include "content/public/browser/browser_thread.h" | 
|   24 #include "content/public/browser/notification_service.h" |   24 #include "content/public/browser/notification_service.h" | 
|   25 #include "content/public/browser/notification_types.h" |   25 #include "content/public/browser/notification_types.h" | 
|   26 #include "content/public/browser/render_process_host.h" |   26 #include "content/public/browser/render_process_host.h" | 
|   27 #include "crypto/sha2.h" |   27 #include "crypto/sha2.h" | 
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  539 std::string ClientSideDetectionService::GetClientReportPhishingUrl() { |  539 std::string ClientSideDetectionService::GetClientReportPhishingUrl() { | 
|  540   std::string url = kClientReportPhishingUrl; |  540   std::string url = kClientReportPhishingUrl; | 
|  541   std::string api_key = google_apis::GetAPIKey(); |  541   std::string api_key = google_apis::GetAPIKey(); | 
|  542   if (!api_key.empty()) { |  542   if (!api_key.empty()) { | 
|  543     base::StringAppendF(&url, "?key=%s", |  543     base::StringAppendF(&url, "?key=%s", | 
|  544                         net::EscapeQueryParamValue(api_key, true).c_str()); |  544                         net::EscapeQueryParamValue(api_key, true).c_str()); | 
|  545   } |  545   } | 
|  546   return url; |  546   return url; | 
|  547 } |  547 } | 
|  548 }  // namespace safe_browsing |  548 }  // namespace safe_browsing | 
| OLD | NEW |