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_BROWSER_VISITEDLINK_MASTER_H__ | 5 #ifndef CHROME_BROWSER_VISITEDLINK_MASTER_H__ |
6 #define CHROME_BROWSER_VISITEDLINK_MASTER_H__ | 6 #define CHROME_BROWSER_VISITEDLINK_MASTER_H__ |
7 | 7 |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 bool suppress_rebuild, | 73 bool suppress_rebuild, |
74 const FilePath& filename, | 74 const FilePath& filename, |
75 int32 default_table_size); | 75 int32 default_table_size); |
76 virtual ~VisitedLinkMaster(); | 76 virtual ~VisitedLinkMaster(); |
77 | 77 |
78 // Must be called immediately after object creation. Nothing else will work | 78 // Must be called immediately after object creation. Nothing else will work |
79 // until this is called. Returns true on success, false means that this | 79 // until this is called. Returns true on success, false means that this |
80 // object won't work. | 80 // object won't work. |
81 bool Init(); | 81 bool Init(); |
82 | 82 |
83 // Duplicates the handle to the shared memory to another process. | 83 base::SharedMemory* shared_memory() { return shared_memory_; } |
84 // Returns true on success. | |
85 bool ShareToProcess(base::ProcessHandle process, | |
86 base::SharedMemoryHandle *new_handle); | |
87 | |
88 // Returns the handle to the shared memory | |
89 base::SharedMemoryHandle GetSharedMemoryHandle(); | |
90 | 84 |
91 // Adds a URL to the table. | 85 // Adds a URL to the table. |
92 void AddURL(const GURL& url); | 86 void AddURL(const GURL& url); |
93 | 87 |
94 // Adds a set of URLs to the table. | 88 // Adds a set of URLs to the table. |
95 void AddURLs(const std::vector<GURL>& url); | 89 void AddURLs(const std::vector<GURL>& url); |
96 | 90 |
97 // Deletes the specified URLs from the table. | 91 // Deletes the specified URLs from the table. |
98 void DeleteURLs(const std::set<GURL>& urls); | 92 void DeleteURLs(const std::set<GURL>& urls); |
99 | 93 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 int32 used_count = 0; | 380 int32 used_count = 0; |
387 for (int32 i = 0; i < table_length_; i++) { | 381 for (int32 i = 0; i < table_length_; i++) { |
388 if (hash_table_[i]) | 382 if (hash_table_[i]) |
389 used_count++; | 383 used_count++; |
390 } | 384 } |
391 DCHECK_EQ(used_count, used_items_); | 385 DCHECK_EQ(used_count, used_items_); |
392 } | 386 } |
393 #endif | 387 #endif |
394 | 388 |
395 #endif // CHROME_BROWSER_VISITEDLINK_MASTER_H__ | 389 #endif // CHROME_BROWSER_VISITEDLINK_MASTER_H__ |
OLD | NEW |