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

Side by Side Diff: chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.cc

Issue 2936773002: Move safe_browsing.mojom into components/safe_browsing. (Closed)
Patch Set: merge Created 3 years, 6 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/renderer/safe_browsing/safe_browsing_url_loader_throttle.h" 5 #include "chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/public/cpp/bindings/interface_request.h" 8 #include "mojo/public/cpp/bindings/interface_request.h"
9 #include "net/url_request/redirect_info.h" 9 #include "net/url_request/redirect_info.h"
10 10
11 namespace safe_browsing { 11 namespace safe_browsing {
12 12
13 SafeBrowsingURLLoaderThrottle::SafeBrowsingURLLoaderThrottle( 13 SafeBrowsingURLLoaderThrottle::SafeBrowsingURLLoaderThrottle(
14 chrome::mojom::SafeBrowsing* safe_browsing, 14 mojom::SafeBrowsing* safe_browsing,
15 int render_frame_id) 15 int render_frame_id)
16 : safe_browsing_(safe_browsing), 16 : safe_browsing_(safe_browsing),
17 render_frame_id_(render_frame_id), 17 render_frame_id_(render_frame_id),
18 weak_factory_(this) {} 18 weak_factory_(this) {}
19 19
20 SafeBrowsingURLLoaderThrottle::~SafeBrowsingURLLoaderThrottle() = default; 20 SafeBrowsingURLLoaderThrottle::~SafeBrowsingURLLoaderThrottle() = default;
21 21
22 void SafeBrowsingURLLoaderThrottle::WillStartRequest( 22 void SafeBrowsingURLLoaderThrottle::WillStartRequest(
23 const GURL& url, 23 const GURL& url,
24 int load_flags, 24 int load_flags,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void SafeBrowsingURLLoaderThrottle::OnConnectionError() { 95 void SafeBrowsingURLLoaderThrottle::OnConnectionError() {
96 DCHECK(!blocked_); 96 DCHECK(!blocked_);
97 97
98 // If a service-side disconnect happens, treat all URLs as if they are safe. 98 // If a service-side disconnect happens, treat all URLs as if they are safe.
99 url_checker_.reset(); 99 url_checker_.reset();
100 pending_checks_ = 0; 100 pending_checks_ = 0;
101 delegate_->Resume(); 101 delegate_->Resume();
102 } 102 }
103 103
104 } // namespace safe_browsing 104 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h ('k') | components/safe_browsing/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698