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

Side by Side Diff: base/process.h

Issue 6736019: Base: A few more files using BASE_API (for base.dll) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « base/native_library.h ('k') | base/process_util.h » ('j') | 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) 2006-2008 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 BASE_PROCESS_H_ 5 #ifndef BASE_PROCESS_H_
6 #define BASE_PROCESS_H_ 6 #define BASE_PROCESS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/base_api.h"
9 #include "base/basictypes.h" 10 #include "base/basictypes.h"
10 #include "build/build_config.h" 11 #include "build/build_config.h"
11 12
12 #include <sys/types.h> 13 #include <sys/types.h>
13 #if defined(OS_WIN) 14 #if defined(OS_WIN)
14 #include <windows.h> 15 #include <windows.h>
15 #endif 16 #endif
16 17
17 namespace base { 18 namespace base {
18 19
(...skipping 11 matching lines...) Expand all
30 typedef pid_t ProcessId; 31 typedef pid_t ProcessId;
31 const ProcessHandle kNullProcessHandle = 0; 32 const ProcessHandle kNullProcessHandle = 0;
32 #endif // defined(OS_WIN) 33 #endif // defined(OS_WIN)
33 34
34 #if defined(OS_POSIX) && !defined(OS_MACOSX) 35 #if defined(OS_POSIX) && !defined(OS_MACOSX)
35 // saved_priority_ will be set to this to indicate that it's not holding 36 // saved_priority_ will be set to this to indicate that it's not holding
36 // a valid value. -20 to 19 are valid process priorities. 37 // a valid value. -20 to 19 are valid process priorities.
37 const int kUnsetProcessPriority = 256; 38 const int kUnsetProcessPriority = 256;
38 #endif 39 #endif
39 40
40 class Process { 41 class BASE_API Process {
41 public: 42 public:
42 Process() : process_(kNullProcessHandle) { 43 Process() : process_(kNullProcessHandle) {
43 #if defined(OS_POSIX) && !defined(OS_MACOSX) 44 #if defined(OS_POSIX) && !defined(OS_MACOSX)
44 saved_priority_ = kUnsetProcessPriority; 45 saved_priority_ = kUnsetProcessPriority;
45 #endif 46 #endif
46 } 47 }
47 48
48 explicit Process(ProcessHandle handle) : process_(handle) { 49 explicit Process(ProcessHandle handle) : process_(handle) {
49 #if defined(OS_POSIX) && !defined(OS_MACOSX) 50 #if defined(OS_POSIX) && !defined(OS_MACOSX)
50 saved_priority_ = kUnsetProcessPriority; 51 saved_priority_ = kUnsetProcessPriority;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #if defined(OS_POSIX) && !defined(OS_MACOSX) 99 #if defined(OS_POSIX) && !defined(OS_MACOSX)
99 // Holds the priority that the process was set to when it was backgrounded. 100 // Holds the priority that the process was set to when it was backgrounded.
100 // If the process wasn't backgrounded it will be kUnsetProcessPriority. 101 // If the process wasn't backgrounded it will be kUnsetProcessPriority.
101 int saved_priority_; 102 int saved_priority_;
102 #endif 103 #endif
103 }; 104 };
104 105
105 } // namespace base 106 } // namespace base
106 107
107 #endif // BASE_PROCESS_H_ 108 #endif // BASE_PROCESS_H_
OLDNEW
« no previous file with comments | « base/native_library.h ('k') | base/process_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698