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

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

Issue 487453002: Experimentally isolate GetSaveFileName in a utility process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small cleanups. Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SHELL_HANDLER_WIN_H_ 5 #ifndef CHROME_UTILITY_SHELL_HANDLER_WIN_H_
6 #define CHROME_UTILITY_SHELL_HANDLER_WIN_H_ 6 #define CHROME_UTILITY_SHELL_HANDLER_WIN_H_
7 7
8 #include <Windows.h> 8 #include <Windows.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/tuple.h" 15 #include "base/tuple.h"
16 #include "chrome/utility/utility_message_handler.h" 16 #include "chrome/utility/utility_message_handler.h"
17 17
18 namespace base { 18 namespace base {
19 class FilePath; 19 class FilePath;
20 } // namespace base 20 } // namespace base
21 21
22 typedef std::vector<Tuple2<base::string16, base::string16> > 22 typedef std::vector<Tuple2<base::string16, base::string16> >
23 GetOpenFileNameFilter; 23 GetOpenFileNameFilter;
24 24
25 struct ChromeUtilityMsg_GetSaveFileName_Params;
26
25 // Handles requests to execute shell operations. Used to protect the browser 27 // Handles requests to execute shell operations. Used to protect the browser
26 // process from instability due to 3rd-party shell extensions. Must be invoked 28 // process from instability due to 3rd-party shell extensions. Must be invoked
27 // in a non-sandboxed utility process. 29 // in a non-sandboxed utility process.
28 class ShellHandler : public UtilityMessageHandler { 30 class ShellHandler : public UtilityMessageHandler {
29 public: 31 public:
30 ShellHandler(); 32 ShellHandler();
31 virtual ~ShellHandler(); 33 virtual ~ShellHandler();
32 34
33 // IPC::Listener implementation 35 // IPC::Listener implementation
34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
35 37
36 private: 38 private:
37 void OnOpenItemViaShell(const base::FilePath& full_path); 39 void OnOpenItemViaShell(const base::FilePath& full_path);
40
38 void OnGetOpenFileName( 41 void OnGetOpenFileName(
39 HWND owner, 42 HWND owner,
40 DWORD flags, 43 DWORD flags,
41 const GetOpenFileNameFilter& filter, 44 const GetOpenFileNameFilter& filter,
42 const base::FilePath& initial_directory, 45 const base::FilePath& initial_directory,
43 const base::FilePath& filename); 46 const base::FilePath& filename);
44 47
48 void OnGetSaveFileName(const ChromeUtilityMsg_GetSaveFileName_Params& params);
49
45 DISALLOW_COPY_AND_ASSIGN(ShellHandler); 50 DISALLOW_COPY_AND_ASSIGN(ShellHandler);
46 }; 51 };
47 52
48 #endif // CHROME_UTILITY_SHELL_HANDLER_WIN_H_ 53 #endif // CHROME_UTILITY_SHELL_HANDLER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698