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

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

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 #ifndef CHROME_BROWSER_SAFE_BROWSING_MOJO_SAFE_BROWSING_IMPL_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_MOJO_SAFE_BROWSING_IMPL_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_MOJO_SAFE_BROWSING_IMPL_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_MOJO_SAFE_BROWSING_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "chrome/browser/safe_browsing/ui_manager.h" 10 #include "chrome/browser/safe_browsing/ui_manager.h"
11 #include "chrome/common/safe_browsing.mojom.h" 11 #include "components/safe_browsing/common/safe_browsing.mojom.h"
12 #include "components/safe_browsing_db/database_manager.h" 12 #include "components/safe_browsing_db/database_manager.h"
13 #include "ipc/ipc_message.h" 13 #include "ipc/ipc_message.h"
14 14
15 namespace service_manager { 15 namespace service_manager {
16 struct BindSourceInfo; 16 struct BindSourceInfo;
17 } 17 }
18 18
19 namespace safe_browsing { 19 namespace safe_browsing {
20 20
21 // This class implements the Mojo interface for renderers to perform 21 // This class implements the Mojo interface for renderers to perform
22 // SafeBrowsing URL checks. 22 // SafeBrowsing URL checks.
23 class MojoSafeBrowsingImpl : public chrome::mojom::SafeBrowsing { 23 class MojoSafeBrowsingImpl : public mojom::SafeBrowsing {
24 public: 24 public:
25 MojoSafeBrowsingImpl( 25 MojoSafeBrowsingImpl(
26 scoped_refptr<SafeBrowsingDatabaseManager> database_manager, 26 scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
27 scoped_refptr<SafeBrowsingUIManager> ui_manager, 27 scoped_refptr<SafeBrowsingUIManager> ui_manager,
28 int render_process_id); 28 int render_process_id);
29 ~MojoSafeBrowsingImpl() override; 29 ~MojoSafeBrowsingImpl() override;
30 30
31 static void Create( 31 static void Create(
32 scoped_refptr<SafeBrowsingDatabaseManager> database_manager, 32 scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
33 scoped_refptr<SafeBrowsingUIManager> ui_manager, 33 scoped_refptr<SafeBrowsingUIManager> ui_manager,
34 int render_process_id, 34 int render_process_id,
35 const service_manager::BindSourceInfo& source_info, 35 const service_manager::BindSourceInfo& source_info,
36 chrome::mojom::SafeBrowsingRequest request); 36 mojom::SafeBrowsingRequest request);
37 37
38 private: 38 private:
39 // chrome::mojom::SafeBrowsing implementation. 39 // mojom::SafeBrowsing implementation.
40 void CreateCheckerAndCheck( 40 void CreateCheckerAndCheck(int32_t render_frame_id,
41 int32_t render_frame_id, 41 mojom::SafeBrowsingUrlCheckerRequest request,
42 chrome::mojom::SafeBrowsingUrlCheckerRequest request, 42 const GURL& url,
43 const GURL& url, 43 int32_t load_flags,
44 int32_t load_flags, 44 content::ResourceType resource_type,
45 content::ResourceType resource_type, 45 CreateCheckerAndCheckCallback callback) override;
46 CreateCheckerAndCheckCallback callback) override;
47 46
48 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; 47 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
49 scoped_refptr<SafeBrowsingUIManager> ui_manager_; 48 scoped_refptr<SafeBrowsingUIManager> ui_manager_;
50 int render_process_id_ = MSG_ROUTING_NONE; 49 int render_process_id_ = MSG_ROUTING_NONE;
51 50
52 DISALLOW_COPY_AND_ASSIGN(MojoSafeBrowsingImpl); 51 DISALLOW_COPY_AND_ASSIGN(MojoSafeBrowsingImpl);
53 }; 52 };
54 53
55 } // namespace safe_browsing 54 } // namespace safe_browsing
56 55
57 #endif // CHROME_BROWSER_SAFE_BROWSING_MOJO_SAFE_BROWSING_IMPL_H_ 56 #endif // CHROME_BROWSER_SAFE_BROWSING_MOJO_SAFE_BROWSING_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_manifest_overlay.json ('k') | chrome/browser/safe_browsing/mojo_safe_browsing_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698