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

Unified Diff: base/global_descriptors_posix.h

Issue 6081007: Start sorting methods in class declarations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_util_proxy.h ('k') | base/json/json_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/global_descriptors_posix.h
diff --git a/base/global_descriptors_posix.h b/base/global_descriptors_posix.h
index ab2b86bf935d7c68d9036bf7e0c038f372b6932e..0cb5b4f75b42dbd3ff253394e1f3650252de0005 100644
--- a/base/global_descriptors_posix.h
+++ b/base/global_descriptors_posix.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -37,6 +37,8 @@ namespace base {
class GlobalDescriptors {
public:
typedef uint32_t Key;
+ typedef std::vector<std::pair<Key, int> > Mapping;
+
// Often we want a canonical descriptor for a given Key. In this case, we add
// the following constant to the key value:
static const int kBaseDescriptor = 3; // 0, 1, 2 are already taken.
@@ -46,11 +48,10 @@ class GlobalDescriptors {
// Get a descriptor given a key. It is a fatal error if the key is not known.
int Get(Key key) const;
+
// Get a descriptor give a key. Returns -1 on error.
int MaybeGet(Key key) const;
- typedef std::vector<std::pair<Key, int> > Mapping;
-
// Set the descriptor for the given key.
void Set(Key key, int fd);
@@ -59,9 +60,9 @@ class GlobalDescriptors {
}
private:
+ friend struct DefaultSingletonTraits<GlobalDescriptors>;
GlobalDescriptors();
~GlobalDescriptors();
- friend struct DefaultSingletonTraits<GlobalDescriptors>;
Mapping descriptors_;
};
« no previous file with comments | « base/file_util_proxy.h ('k') | base/json/json_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698