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

Side by Side Diff: content/child/scoped_child_process_reference.h

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CHILD_SCOPED_CHILD_PROCESS_REFERENCE_H_ 5 #ifndef CONTENT_CHILD_SCOPED_CHILD_PROCESS_REFERENCE_H_
6 #define CONTENT_CHILD_SCOPED_CHILD_PROCESS_REFERENCE_H_ 6 #define CONTENT_CHILD_SCOPED_CHILD_PROCESS_REFERENCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/macros.h"
9 9
10 namespace base { 10 namespace base {
11 class TimeDelta; 11 class TimeDelta;
12 } 12 }
13 13
14 namespace content { 14 namespace content {
15 15
16 // Scoper class that automatically adds a reference to the current child 16 // Scoper class that automatically adds a reference to the current child
17 // process in constructor and releases the reference on scope out. 17 // process in constructor and releases the reference on scope out.
18 // Consumers of this class can call ReleaseWithDelay() to explicitly release 18 // Consumers of this class can call ReleaseWithDelay() to explicitly release
19 // the reference with a certain delay. 19 // the reference with a certain delay.
20 class ScopedChildProcessReference { 20 class ScopedChildProcessReference {
21 public: 21 public:
22 ScopedChildProcessReference(); 22 ScopedChildProcessReference();
23 ~ScopedChildProcessReference(); 23 ~ScopedChildProcessReference();
24 24
25 // Releases the process reference after |delay|. Once this is called 25 // Releases the process reference after |delay|. Once this is called
26 // scoping out has no effect. 26 // scoping out has no effect.
27 // It is not valid to call this more than once. 27 // It is not valid to call this more than once.
28 void ReleaseWithDelay(const base::TimeDelta& delay); 28 void ReleaseWithDelay(const base::TimeDelta& delay);
29 29
30 private: 30 private:
31 bool has_reference_; 31 bool has_reference_;
32
32 DISALLOW_COPY_AND_ASSIGN(ScopedChildProcessReference); 33 DISALLOW_COPY_AND_ASSIGN(ScopedChildProcessReference);
33 }; 34 };
34 35
35 } // namespace content 36 } // namespace content
36 37
37 #endif // CONTENT_CHILD_SCOPED_CHILD_PROCESS_REFERENCE_H_ 38 #endif // CONTENT_CHILD_SCOPED_CHILD_PROCESS_REFERENCE_H_
OLDNEW
« no previous file with comments | « content/child/runtime_features.cc ('k') | content/child/service_worker/service_worker_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698