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

Side by Side Diff: components/mus/ws/ids.h

Issue 1666843002: Refactor StringPiece hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sort includes. Created 4 years, 10 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
« no previous file with comments | « base/strings/string_piece.h ('k') | media/midi/midi_manager_alsa.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_MUS_WS_IDS_H_ 5 #ifndef COMPONENTS_MUS_WS_IDS_H_
6 #define COMPONENTS_MUS_WS_IDS_H_ 6 #define COMPONENTS_MUS_WS_IDS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <tuple> 10 #include <tuple>
11 11
12 #include "base/containers/hash_tables.h"
12 #include "base/hash.h" 13 #include "base/hash.h"
13 #include "components/mus/common/types.h" 14 #include "components/mus/common/types.h"
14 #include "components/mus/common/util.h" 15 #include "components/mus/common/util.h"
15 16
16 namespace mus { 17 namespace mus {
17 namespace ws { 18 namespace ws {
18 19
19 // Connection id is used to indicate no connection. That is, no WindowTreeImpl 20 // Connection id is used to indicate no connection. That is, no WindowTreeImpl
20 // ever gets this id. 21 // ever gets this id.
21 const ConnectionSpecificId kInvalidConnectionId = 0; 22 const ConnectionSpecificId kInvalidConnectionId = 0;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 template <> 104 template <>
104 struct hash<mus::ws::WindowId> { 105 struct hash<mus::ws::WindowId> {
105 size_t operator()(const mus::ws::WindowId& id) const { 106 size_t operator()(const mus::ws::WindowId& id) const {
106 return hash<mus::Id>()(WindowIdToTransportId(id)); 107 return hash<mus::Id>()(WindowIdToTransportId(id));
107 } 108 }
108 }; 109 };
109 110
110 } // namespace BASE_HASH_NAMESPACE 111 } // namespace BASE_HASH_NAMESPACE
111 112
112 #endif // COMPONENTS_MUS_WS_IDS_H_ 113 #endif // COMPONENTS_MUS_WS_IDS_H_
OLDNEW
« no previous file with comments | « base/strings/string_piece.h ('k') | media/midi/midi_manager_alsa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698