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

Side by Side Diff: content/common/child_process_info.h

Issue 7583016: wstring: remove wstrings from ChildProcessInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « content/browser/worker_host/worker_process_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_COMMON_CHILD_PROCESS_INFO_H_ 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_INFO_H_
6 #define CONTENT_COMMON_CHILD_PROCESS_INFO_H_ 6 #define CONTENT_COMMON_CHILD_PROCESS_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Returns the type of the process. 54 // Returns the type of the process.
55 ProcessType type() const { return type_; } 55 ProcessType type() const { return type_; }
56 56
57 // Returns the renderer subtype of this process. 57 // Returns the renderer subtype of this process.
58 // Only valid if the type() is RENDER_PROCESS. 58 // Only valid if the type() is RENDER_PROCESS.
59 RendererProcessType renderer_type() const { return renderer_type_; } 59 RendererProcessType renderer_type() const { return renderer_type_; }
60 60
61 // Returns the name of the process. i.e. for plugins it might be Flash, while 61 // Returns the name of the process. i.e. for plugins it might be Flash, while
62 // for workers it might be the domain that it's from. 62 // for workers it might be the domain that it's from.
63 std::wstring name() const { return name_; } 63 const string16& name() const { return name_; }
64 64
65 // Returns the version of the exe, this only appliest to plugins. Otherwise 65 // Returns the version of the exe, this only appliest to plugins. Otherwise
66 // the string is empty. 66 // the string is empty.
67 std::wstring version() const { return version_; } 67 const string16& version() const { return version_; }
68 68
69 // Getter to the process handle. 69 // Getter to the process handle.
70 base::ProcessHandle handle() const { return process_.handle(); } 70 base::ProcessHandle handle() const { return process_.handle(); }
71 71
72 // Getter to the process ID. 72 // Getter to the process ID.
73 int pid() const { return process_.pid(); } 73 int pid() const { return process_.pid(); }
74 74
75 // The unique identifier for this child process. This identifier is NOT a 75 // The unique identifier for this child process. This identifier is NOT a
76 // process ID, and will be unique for all types of child process for 76 // process ID, and will be unique for all types of child process for
77 // one run of the browser. 77 // one run of the browser.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 protected: 114 protected:
115 // Derived objects need to use this constructor so we know what type we are. 115 // Derived objects need to use this constructor so we know what type we are.
116 // If the caller has already generated a unique ID for this child process, 116 // If the caller has already generated a unique ID for this child process,
117 // it should pass it as the second argument. Otherwise, -1 should be passed 117 // it should pass it as the second argument. Otherwise, -1 should be passed
118 // and a unique ID will be automatically generated. 118 // and a unique ID will be automatically generated.
119 ChildProcessInfo(ProcessType type, int id); 119 ChildProcessInfo(ProcessType type, int id);
120 120
121 void set_type(ProcessType type) { type_ = type; } 121 void set_type(ProcessType type) { type_ = type; }
122 void set_renderer_type(RendererProcessType type) { renderer_type_ = type; } 122 void set_renderer_type(RendererProcessType type) { renderer_type_ = type; }
123 void set_name(const std::wstring& name) { name_ = name; } 123 void set_name(const string16& name) { name_ = name; }
124 void set_version(const std::wstring& ver) { version_ = ver; } 124 void set_version(const string16& ver) { version_ = ver; }
125 void set_handle(base::ProcessHandle handle) { process_.set_handle(handle); } 125 void set_handle(base::ProcessHandle handle) { process_.set_handle(handle); }
126 126
127 private: 127 private:
128 ProcessType type_; 128 ProcessType type_;
129 RendererProcessType renderer_type_; 129 RendererProcessType renderer_type_;
130 std::wstring name_; 130 string16 name_;
131 std::wstring version_; 131 string16 version_;
132 int id_; 132 int id_;
133 133
134 // The handle to the process. 134 // The handle to the process.
135 mutable base::Process process_; 135 mutable base::Process process_;
136 }; 136 };
137 137
138 #endif // CONTENT_COMMON_CHILD_PROCESS_INFO_H_ 138 #endif // CONTENT_COMMON_CHILD_PROCESS_INFO_H_
OLDNEW
« no previous file with comments | « content/browser/worker_host/worker_process_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698