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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_impl.h

Issue 2900563002: Network service: Safe browsing check for sub-resources from renderer. (Closed)
Patch Set: . 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_IMPL_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_IMPL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "chrome/browser/safe_browsing/ui_manager.h"
11 #include "chrome/common/safe_browsing.mojom.h"
12 #include "components/safe_browsing_db/database_manager.h"
13
14 namespace service_manager {
15 struct BindSourceInfo;
16 }
17
18 namespace safe_browsing {
19
20 class SafeBrowsingImpl : public chrome::mojom::SafeBrowsing {
jam 2017/05/25 15:45:50 nit: document purpose of this class
yzshen1 2017/05/26 20:43:52 Done.
21 public:
22 SafeBrowsingImpl(scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
jam 2017/05/25 15:45:50 did you consider having one of these classes per p
yzshen1 2017/05/26 20:43:51 I have changed it as you suggested. It not only re
23 scoped_refptr<SafeBrowsingUIManager> ui_manager,
24 int render_process_id,
25 int render_frame_id);
26 ~SafeBrowsingImpl() override;
27
28 static void Create(
29 scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
30 scoped_refptr<SafeBrowsingUIManager> ui_manager,
31 int render_process_id,
32 int render_frame_id,
33 const service_manager::BindSourceInfo& source_info,
34 chrome::mojom::SafeBrowsingRequest request);
35
36 private:
37 // chrome::mojom::SafeBrowsing implementation.
38 void CreateCheckerAndCheck(
39 chrome::mojom::SafeBrowsingUrlCheckerRequest request,
40 const GURL& url,
41 int32_t load_flags,
42 content::ResourceType resource_type,
43 const CreateCheckerAndCheckCallback& callback) override;
44
45 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
46 scoped_refptr<SafeBrowsingUIManager> ui_manager_;
47 int render_process_id_ = 0;
jam 2017/05/25 15:45:50 nit: here and below, use MSG_ROUTING_NONE
yzshen1 2017/05/26 20:43:51 Done.
48 int render_frame_id_ = 0;
49
50 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingImpl);
51 };
52
53 } // namespace safe_browsing
54
55 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698