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

Side by Side Diff: components/visitedlink/browser/visitedlink_master.h

Issue 11825011: Componentize visitedlinks to src/components/visitedlink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CHROME_BROWSER_VISITEDLINK_VISITEDLINK_MASTER_H_ 5 #ifndef COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_MASTER_H_
6 #define CHROME_BROWSER_VISITEDLINK_VISITEDLINK_MASTER_H_ 6 #define COMPONENTS_VISITEDLINK_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
11 #include <set> 11 #include <set>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/callback_forward.h" 15 #include "base/callback_forward.h"
16 #include "base/file_path.h" 16 #include "base/file_path.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/shared_memory.h" 18 #include "base/shared_memory.h"
19 #include "base/threading/sequenced_worker_pool.h" 19 #include "base/threading/sequenced_worker_pool.h"
20 #include "chrome/common/visitedlink_common.h" 20 #include "components/visitedlink/common/visitedlink_common.h"
21 21
22 #if defined(UNIT_TEST) || defined(PERF_TEST) || !defined(NDEBUG) 22 #if defined(UNIT_TEST) || defined(PERF_TEST) || !defined(NDEBUG)
23 #include "base/logging.h" 23 #include "base/logging.h"
24 #endif 24 #endif
25 25
26 class GURL; 26 class GURL;
27 class VisitedLinkDelegate;
28 27
29 namespace content { 28 namespace content {
30 class BrowserContext; 29 class BrowserContext;
31 } // namespace content 30 } // namespace content
32 31
32 namespace components {
33
34 class VisitedLinkDelegate;
33 35
34 // Controls the link coloring database. The master controls all writing to the 36 // Controls the link coloring database. The master controls all writing to the
35 // database as well as disk I/O. There should be only one master. 37 // database as well as disk I/O. There should be only one master.
36 // 38 //
37 // This class will defer writing operations to the file thread. This means that 39 // This class will defer writing operations to the file thread. This means that
38 // class destruction, the file may still be open since operations are pending on 40 // class destruction, the file may still be open since operations are pending on
39 // another thread. 41 // another thread.
40 class VisitedLinkMaster : public VisitedLinkCommon { 42 class VisitedLinkMaster : public VisitedLinkCommon {
41 public: 43 public:
42 // Listens to the link coloring database events. The master is given this 44 // Listens to the link coloring database events. The master is given this
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 inline void VisitedLinkMaster::DebugValidate() { 426 inline void VisitedLinkMaster::DebugValidate() {
425 int32 used_count = 0; 427 int32 used_count = 0;
426 for (int32 i = 0; i < table_length_; i++) { 428 for (int32 i = 0; i < table_length_; i++) {
427 if (hash_table_[i]) 429 if (hash_table_[i])
428 used_count++; 430 used_count++;
429 } 431 }
430 DCHECK_EQ(used_count, used_items_); 432 DCHECK_EQ(used_count, used_items_);
431 } 433 }
432 #endif 434 #endif
433 435
434 #endif // CHROME_BROWSER_VISITEDLINK_VISITEDLINK_MASTER_H_ 436 } // namespace components
437
438 #endif // COMPONENTS_VISITEDLINK_BROWSER_VISITEDLINK_MASTER_H_
OLDNEW
« no previous file with comments | « components/visitedlink/browser/visitedlink_event_listener.cc ('k') | components/visitedlink/browser/visitedlink_master.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698