| 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_WIN_RENDERER_VISITEDLINK_SLAVE_H__ | 5 #ifndef CHROME_RENDERER_VISITEDLINK_SLAVE_H_ |
| 6 #define CHROME_WIN_RENDERER_VISITEDLINK_SLAVE_H__ | 6 #define CHROME_RENDERER_VISITEDLINK_SLAVE_H_ |
| 7 | 7 |
| 8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
| 9 #include "chrome/common/visitedlink_common.h" | 9 #include "chrome/common/visitedlink_common.h" |
| 10 | 10 |
| 11 // Reads the link coloring database provided by the master. There can be any | 11 // Reads the link coloring database provided by the master. There can be any |
| 12 // number of slaves reading the same database. | 12 // number of slaves reading the same database. |
| 13 class VisitedLinkSlave : public VisitedLinkCommon | 13 class VisitedLinkSlave : public VisitedLinkCommon |
| 14 { | 14 { |
| 15 public: | 15 public: |
| 16 VisitedLinkSlave(); | 16 VisitedLinkSlave(); |
| 17 virtual ~VisitedLinkSlave(); | 17 virtual ~VisitedLinkSlave(); |
| 18 | 18 |
| 19 // Called to initialize this object, nothing will work until this is called. | 19 // Called to initialize this object, nothing will work until this is called. |
| 20 // It can also be called again at any time to update the table that we're | 20 // It can also be called again at any time to update the table that we're |
| 21 // using. The handle should be the handle generated by the VisitedLinkMaster. | 21 // using. The handle should be the handle generated by the VisitedLinkMaster. |
| 22 // Returns true on success. | 22 // Returns true on success. |
| 23 bool Init(SharedMemoryHandle shared_memory); | 23 bool Init(base::SharedMemoryHandle shared_memory); |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 void FreeTable(); | 26 void FreeTable(); |
| 27 | 27 |
| 28 // shared memory consists of a SharedHeader followed by the table | 28 // shared memory consists of a SharedHeader followed by the table |
| 29 SharedMemory* shared_memory_; | 29 base::SharedMemory* shared_memory_; |
| 30 | 30 |
| 31 DISALLOW_EVIL_CONSTRUCTORS(VisitedLinkSlave); | 31 DISALLOW_COPY_AND_ASSIGN(VisitedLinkSlave); |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 #endif // WIN_RENDERER_VISITEDLINK_SLAVE_H__ | 34 #endif // CHROME_RENDERER_VISITEDLINK_SLAVE_H_ |
| OLD | NEW |