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

Side by Side Diff: chrome/browser/chromeos/pipe_reader.h

Issue 341044: Move chromeos code to namespace chromeos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_CHROMEOS_PIPE_READER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PIPE_READER_H_
6 #define CHROME_BROWSER_CHROMEOS_PIPE_READER_H_ 6 #define CHROME_BROWSER_CHROMEOS_PIPE_READER_H_
7 7
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <string>
11 #include <sys/stat.h> 10 #include <sys/stat.h>
12 #include <sys/types.h> 11 #include <sys/types.h>
13 #include <unistd.h> 12 #include <unistd.h>
14 13
14 #include <string>
15
15 #include "base/basictypes.h" 16 #include "base/basictypes.h"
16 17
18 namespace chromeos {
19
17 // Given a named pipe, this class reads data from it and returns it as a string. 20 // Given a named pipe, this class reads data from it and returns it as a string.
18 // Currently, we are sending login cookies from the Chrome OS login manager to 21 // Currently, we are sending login cookies from the Chrome OS login manager to
19 // Chrome over a named Unix pipe. We want to replace this with DBus, but 22 // Chrome over a named Unix pipe. We want to replace this with DBus, but
20 // would like to create a DBus wrapper library to use throughout Chrome OS 23 // would like to create a DBus wrapper library to use throughout Chrome OS
21 // first. This stopgap lets us get the infrastructure for passing credentials 24 // first. This stopgap lets us get the infrastructure for passing credentials
22 // to Chrome in place, which will help clean up login jankiness, and also 25 // to Chrome in place, which will help clean up login jankiness, and also
23 // refactor our code as we await the DBus stuff. 26 // refactor our code as we await the DBus stuff.
24 // TODO(cmasone): get rid of this code and replace with DBus. 27 // TODO(cmasone): get rid of this code and replace with DBus.
25 28
26 class PipeReader { 29 class PipeReader {
(...skipping 14 matching lines...) Expand all
41 // For testing. 44 // For testing.
42 PipeReader() : pipe_(NULL) {} 45 PipeReader() : pipe_(NULL) {}
43 46
44 private: 47 private:
45 FILE *pipe_; 48 FILE *pipe_;
46 std::string pipe_name_; 49 std::string pipe_name_;
47 50
48 DISALLOW_COPY_AND_ASSIGN(PipeReader); 51 DISALLOW_COPY_AND_ASSIGN(PipeReader);
49 }; 52 };
50 53
54 } // namespace chromeos
55
51 #endif // CHROME_BROWSER_CHROMEOS_PIPE_READER_H_ 56 #endif // CHROME_BROWSER_CHROMEOS_PIPE_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698