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

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

Issue 2733343002: Move chrome/common/safe_browsing/csd.proto to components/safe_browsing (Closed)
Patch Set: rebase again Created 3 years, 9 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/threading/sequenced_worker_pool.h" 17 #include "base/threading/sequenced_worker_pool.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 "chrome/common/safe_browsing/csd.pb.h" 21 #include "components/safe_browsing/csd.pb.h"
22 #include "components/safe_browsing_db/database_manager.h" 22 #include "components/safe_browsing_db/database_manager.h"
23 #include "components/safe_browsing_db/safe_browsing_prefs.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/url_request/report_sender.h" 27 #include "net/url_request/report_sender.h"
28 #include "skia/ext/image_operations.h" 28 #include "skia/ext/image_operations.h"
29 #include "third_party/skia/include/core/SkBitmap.h" 29 #include "third_party/skia/include/core/SkBitmap.h"
30 #include "ui/gfx/codec/png_codec.h" 30 #include "ui/gfx/codec/png_codec.h"
31 #include "ui/gfx/geometry/size.h" 31 #include "ui/gfx/geometry/size.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 std::string serialized_report; 216 std::string serialized_report;
217 report.SerializeToString(&serialized_report); 217 report.SerializeToString(&serialized_report);
218 report_sender_->Send( 218 report_sender_->Send(
219 GURL(kReportingUploadUrl), "application/octet-stream", serialized_report, 219 GURL(kReportingUploadUrl), "application/octet-stream", serialized_report,
220 base::Bind(&LogReportResult, GURL(kReportingUploadUrl), net::OK), 220 base::Bind(&LogReportResult, GURL(kReportingUploadUrl), net::OK),
221 base::Bind(&LogReportResult)); 221 base::Bind(&LogReportResult));
222 // TODO(johnme): Consider logging bandwidth and/or duration to UMA. 222 // TODO(johnme): Consider logging bandwidth and/or duration to UMA.
223 } 223 }
224 224
225 } // namespace safe_browsing 225 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698