OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_COMMON_VISITEDLINK_COMMON_H__ | 5 #ifndef COMPONENTS_VISITEDLINK_COMMON_VISITEDLINK_COMMON_H_ |
6 #define CHROME_COMMON_VISITEDLINK_COMMON_H__ | 6 #define COMPONENTS_VISITEDLINK_COMMON_VISITEDLINK_COMMON_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 | 11 |
12 class GURL; | 12 class GURL; |
13 | 13 |
| 14 namespace components { |
| 15 |
14 // number of bytes in the salt | 16 // number of bytes in the salt |
15 #define LINK_SALT_LENGTH 8 | 17 #define LINK_SALT_LENGTH 8 |
16 | 18 |
17 // A multiprocess-safe database of the visited links for the browser. There | 19 // A multiprocess-safe database of the visited links for the browser. There |
18 // should be exactly one process that has write access (implemented by | 20 // should be exactly one process that has write access (implemented by |
19 // VisitedLinkMaster), while all other processes should be read-only | 21 // VisitedLinkMaster), while all other processes should be read-only |
20 // (implemented by VisitedLinkSlave). These other processes add links by calling | 22 // (implemented by VisitedLinkSlave). These other processes add links by calling |
21 // the writer process to add them for it. The writer may also notify the readers | 23 // the writer process to add them for it. The writer may also notify the readers |
22 // to replace their table when the table is resized. | 24 // to replace their table when the table is resized. |
23 // | 25 // |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // the number of items in the hash table | 126 // the number of items in the hash table |
125 int32 table_length_; | 127 int32 table_length_; |
126 | 128 |
127 // salt used for each URL when computing the fingerprint | 129 // salt used for each URL when computing the fingerprint |
128 uint8 salt_[LINK_SALT_LENGTH]; | 130 uint8 salt_[LINK_SALT_LENGTH]; |
129 | 131 |
130 private: | 132 private: |
131 DISALLOW_COPY_AND_ASSIGN(VisitedLinkCommon); | 133 DISALLOW_COPY_AND_ASSIGN(VisitedLinkCommon); |
132 }; | 134 }; |
133 | 135 |
134 #endif // CHROME_COMMON_VISITEDLINK_COMMON_H_ | 136 } // namespace components |
| 137 |
| 138 #endif // COMPONENTS_VISITEDLINK_COMMON_VISITEDLINK_COMMON_H_ |
OLD | NEW |