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

Side by Side Diff: base/scoped_handle.h

Issue 6126002: Remove base/scoped_handle_win.h stub and fix up all callers to use the new location and namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 11 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 (c) 2010 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_SCOPED_HANDLE_H_ 5 #ifndef BASE_SCOPED_HANDLE_H_
6 #define BASE_SCOPED_HANDLE_H_ 6 #define BASE_SCOPED_HANDLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 12
13 #if defined(OS_WIN)
14 #include "base/scoped_handle_win.h"
15 #endif
16
17 class ScopedStdioHandle { 13 class ScopedStdioHandle {
18 public: 14 public:
19 ScopedStdioHandle() 15 ScopedStdioHandle()
20 : handle_(NULL) { } 16 : handle_(NULL) { }
21 17
22 explicit ScopedStdioHandle(FILE* handle) 18 explicit ScopedStdioHandle(FILE* handle)
23 : handle_(handle) { } 19 : handle_(handle) { }
24 20
25 ~ScopedStdioHandle() { 21 ~ScopedStdioHandle() {
26 Close(); 22 Close();
(...skipping 19 matching lines...) Expand all
46 handle_ = newhandle; 42 handle_ = newhandle;
47 } 43 }
48 44
49 private: 45 private:
50 FILE* handle_; 46 FILE* handle_;
51 47
52 DISALLOW_COPY_AND_ASSIGN(ScopedStdioHandle); 48 DISALLOW_COPY_AND_ASSIGN(ScopedStdioHandle);
53 }; 49 };
54 50
55 #endif // BASE_SCOPED_HANDLE_H_ 51 #endif // BASE_SCOPED_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698