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

Side by Side Diff: chrome/utility/chrome_content_utility_client.h

Issue 2737763002: Convert utility process Safe Browsing ZIP/DMG Analyzer IPC to mojo (Closed)
Patch Set: Add //components/safe_browsing:csd_proto to typemap deps. 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ 5 #ifndef CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_
6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ 6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_
7 7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 8 #include "base/macros.h"
10 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
11 #include "build/build_config.h"
12 #include "content/public/utility/content_utility_client.h" 10 #include "content/public/utility/content_utility_client.h"
13 #include "ipc/ipc_platform_file.h"
14 11
15 class UtilityMessageHandler; 12 class UtilityMessageHandler;
16 13
17 class ChromeContentUtilityClient : public content::ContentUtilityClient { 14 class ChromeContentUtilityClient : public content::ContentUtilityClient {
18 public: 15 public:
19 ChromeContentUtilityClient(); 16 ChromeContentUtilityClient();
20 ~ChromeContentUtilityClient() override; 17 ~ChromeContentUtilityClient() override;
21 18
22 // content::ContentUtilityClient: 19 // content::ContentUtilityClient:
23 void UtilityThreadStarted() override; 20 void UtilityThreadStarted() override;
24 bool OnMessageReceived(const IPC::Message& message) override; 21 bool OnMessageReceived(const IPC::Message& message) override;
25 void ExposeInterfacesToBrowser( 22 void ExposeInterfacesToBrowser(
26 service_manager::InterfaceRegistry* registry) override; 23 service_manager::InterfaceRegistry* registry) override;
27 void RegisterServices(StaticServiceMap* services) override; 24 void RegisterServices(StaticServiceMap* services) override;
28 25
29 static void PreSandboxStartup(); 26 static void PreSandboxStartup();
30 27
31 private: 28 private:
32 // IPC message handlers. 29 // IPC message handlers.
33 void OnStartupPing();
34 #if defined(FULL_SAFE_BROWSING)
35 void OnAnalyzeZipFileForDownloadProtection(
36 const IPC::PlatformFileForTransit& zip_file,
37 const IPC::PlatformFileForTransit& temp_file);
38 #if defined(OS_MACOSX)
39 void OnAnalyzeDmgFileForDownloadProtection(
40 const IPC::PlatformFileForTransit& dmg_file);
41 #endif // defined(OS_MACOSX)
42 #endif // defined(FULL_SAFE_BROWSING)
43
44 typedef ScopedVector<UtilityMessageHandler> Handlers; 30 typedef ScopedVector<UtilityMessageHandler> Handlers;
45 Handlers handlers_; 31 Handlers handlers_;
46 32
33 // True if the utility process runs with elevated privileges.
47 bool utility_process_running_elevated_; 34 bool utility_process_running_elevated_;
48 35
49 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); 36 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient);
50 }; 37 };
51 38
52 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ 39 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698