OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_DOWNLOAD_ID_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_ID_H_ |
6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_ID_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_ID_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 // DownloadId combines per-profile Download ids with an indication of which | 17 // DownloadId combines per-profile Download ids with an indication of which |
18 // profile in order to be globally unique. DownloadIds are not persistent across | 18 // profile in order to be globally unique. DownloadIds are not persistent across |
19 // sessions, but their local() field is. | 19 // sessions, but their local() field is. |
20 class DownloadId { | 20 class DownloadId { |
21 public: | 21 public: |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 return id.hash(); | 93 return id.hash(); |
94 } | 94 } |
95 }; | 95 }; |
96 #elif defined(COMPILER_MSVC) | 96 #elif defined(COMPILER_MSVC) |
97 inline size_t hash_value(const content::DownloadId& id) { | 97 inline size_t hash_value(const content::DownloadId& id) { |
98 return id.hash(); | 98 return id.hash(); |
99 } | 99 } |
100 #endif // COMPILER | 100 #endif // COMPILER |
101 } | 101 } |
102 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ID_H_ | 102 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ID_H_ |
OLD | NEW |