Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1257)

Side by Side Diff: chrome/browser/safe_browsing/notification_image_reporter.cc

Issue 2869383002: Unify safe_browsing* components [1]: move safe_browsing_prefs* (Closed)
Patch Set: fix win bots Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/notification_image_reporter.h" 5 #include "chrome/browser/safe_browsing/notification_image_reporter.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/feature_list.h" 11 #include "base/feature_list.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/memory/ref_counted_memory.h" 14 #include "base/memory/ref_counted_memory.h"
15 #include "base/metrics/histogram_macros.h" 15 #include "base/metrics/histogram_macros.h"
16 #include "base/rand_util.h" 16 #include "base/rand_util.h"
17 #include "base/task_scheduler/post_task.h" 17 #include "base/task_scheduler/post_task.h"
18 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 20 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
21 #include "components/safe_browsing/common/safe_browsing_prefs.h"
21 #include "components/safe_browsing/csd.pb.h" 22 #include "components/safe_browsing/csd.pb.h"
22 #include "components/safe_browsing_db/database_manager.h" 23 #include "components/safe_browsing_db/database_manager.h"
23 #include "components/safe_browsing_db/safe_browsing_prefs.h"
24 #include "components/variations/variations_associated_data.h" 24 #include "components/variations/variations_associated_data.h"
25 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
26 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
27 #include "net/http/http_status_code.h" 27 #include "net/http/http_status_code.h"
28 #include "net/url_request/report_sender.h" 28 #include "net/url_request/report_sender.h"
29 #include "skia/ext/image_operations.h" 29 #include "skia/ext/image_operations.h"
30 #include "third_party/skia/include/core/SkBitmap.h" 30 #include "third_party/skia/include/core/SkBitmap.h"
31 #include "ui/gfx/codec/png_codec.h" 31 #include "ui/gfx/codec/png_codec.h"
32 #include "ui/gfx/geometry/size.h" 32 #include "ui/gfx/geometry/size.h"
33 #include "url/gurl.h" 33 #include "url/gurl.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 report.SerializeToString(&serialized_report); 215 report.SerializeToString(&serialized_report);
216 report_sender_->Send(GURL(kReportingUploadUrl), "application/octet-stream", 216 report_sender_->Send(GURL(kReportingUploadUrl), "application/octet-stream",
217 serialized_report, 217 serialized_report,
218 base::Bind(&LogReportResult, GURL(kReportingUploadUrl), 218 base::Bind(&LogReportResult, GURL(kReportingUploadUrl),
219 net::OK, net::HTTP_OK), 219 net::OK, net::HTTP_OK),
220 base::Bind(&LogReportResult)); 220 base::Bind(&LogReportResult));
221 // TODO(johnme): Consider logging bandwidth and/or duration to UMA. 221 // TODO(johnme): Consider logging bandwidth and/or duration to UMA.
222 } 222 }
223 223
224 } // namespace safe_browsing 224 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698