 Chromium Code Reviews
 Chromium Code Reviews Issue 960753003:
  Add a name to the proxy resolver utility process and display it in the task manager.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-oop
    
  
    Issue 960753003:
  Add a name to the proxy resolver utility process and display it in the task manager.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-oop| OLD | NEW | 
|---|---|
| 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 CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 
| 6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 void DisableSandbox() override; | 50 void DisableSandbox() override; | 
| 51 #if defined(OS_WIN) | 51 #if defined(OS_WIN) | 
| 52 void ElevatePrivileges() override; | 52 void ElevatePrivileges() override; | 
| 53 #endif | 53 #endif | 
| 54 const ChildProcessData& GetData() override; | 54 const ChildProcessData& GetData() override; | 
| 55 #if defined(OS_POSIX) | 55 #if defined(OS_POSIX) | 
| 56 void SetEnv(const base::EnvironmentMap& env) override; | 56 void SetEnv(const base::EnvironmentMap& env) override; | 
| 57 #endif | 57 #endif | 
| 58 bool StartMojoMode() override; | 58 bool StartMojoMode() override; | 
| 59 ServiceRegistry* GetServiceRegistry() override; | 59 ServiceRegistry* GetServiceRegistry() override; | 
| 60 void SetName(const std::string& name) override; | |
| 60 | 61 | 
| 61 void set_child_flags(int flags) { child_flags_ = flags; } | 62 void set_child_flags(int flags) { child_flags_ = flags; } | 
| 62 | 63 | 
| 63 private: | 64 private: | 
| 64 // Starts a process if necessary. Returns true if it succeeded or a process | 65 // Starts a process if necessary. Returns true if it succeeded or a process | 
| 65 // has already been started via StartBatchMode(). | 66 // has already been started via StartBatchMode(). | 
| 66 bool StartProcess(); | 67 bool StartProcess(); | 
| 67 | 68 | 
| 68 // BrowserChildProcessHost: | 69 // BrowserChildProcessHost: | 
| 69 bool OnMessageReceived(const IPC::Message& message) override; | 70 bool OnMessageReceived(const IPC::Message& message) override; | 
| (...skipping 20 matching lines...) Expand all Loading... | |
| 90 // Whether to launch the process with elevated privileges. | 91 // Whether to launch the process with elevated privileges. | 
| 91 bool run_elevated_; | 92 bool run_elevated_; | 
| 92 | 93 | 
| 93 // Flags defined in ChildProcessHost with which to start the process. | 94 // Flags defined in ChildProcessHost with which to start the process. | 
| 94 int child_flags_; | 95 int child_flags_; | 
| 95 | 96 | 
| 96 base::EnvironmentMap env_; | 97 base::EnvironmentMap env_; | 
| 97 | 98 | 
| 98 bool started_; | 99 bool started_; | 
| 99 | 100 | 
| 101 std::string name_; | |
| 
James Hawkins
2015/03/19 22:32:53
nit: Document this member var (the others should b
 
Anand Mistry (off Chromium)
2015/03/20 01:03:03
Done.
 | |
| 102 | |
| 100 scoped_ptr<BrowserChildProcessHostImpl> process_; | 103 scoped_ptr<BrowserChildProcessHostImpl> process_; | 
| 101 | 104 | 
| 102 // Used in single-process mode instead of process_. | 105 // Used in single-process mode instead of process_. | 
| 103 scoped_ptr<base::Thread> in_process_thread_; | 106 scoped_ptr<base::Thread> in_process_thread_; | 
| 104 | 107 | 
| 105 // Browser-side Mojo endpoint which sets up a Mojo channel with the child | 108 // Browser-side Mojo endpoint which sets up a Mojo channel with the child | 
| 106 // process and contains the browser's ServiceRegistry. | 109 // process and contains the browser's ServiceRegistry. | 
| 107 scoped_ptr<MojoApplicationHost> mojo_application_host_; | 110 scoped_ptr<MojoApplicationHost> mojo_application_host_; | 
| 108 | 111 | 
| 109 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 112 DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl); | 
| 110 }; | 113 }; | 
| 111 | 114 | 
| 112 } // namespace content | 115 } // namespace content | 
| 113 | 116 | 
| 114 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 117 #endif // CONTENT_BROWSER_UTILITY_PROCESS_HOST_IMPL_H_ | 
| OLD | NEW |