Commit 44640d47 authored by sdefresne's avatar sdefresne Committed by Commit bot

Fix TopSitesObserver implementation

Add a virtual destructor since all class with a virtual method should
have a virtual destructor.

Disable copy constructor and assignment operator using the macro
DISALLOW_COPY_AND_ASSIGN since you don't want to do slicing when
using a class with virtual methods.

BUG=None

Review URL: https://codereview.chromium.org/853643003

Cr-Commit-Position: refs/heads/master@{#311473}
parent 7bc51702
......@@ -5,18 +5,26 @@
#ifndef COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_OBSERVER_H_
#define COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_OBSERVER_H_
#include "base/macros.h"
namespace history {
class TopSites;
// Interface for observing notifications from TopSites.
class TopSitesObserver {
public:
TopSitesObserver() {}
virtual ~TopSitesObserver() {}
// Is called when TopSites finishes loading.
virtual void TopSitesLoaded(history::TopSites* top_sites) = 0;
// Is called when either one of the most visited urls
// changed, or one of the images changes.
virtual void TopSitesChanged(history::TopSites* top_sites) = 0;
private:
DISALLOW_COPY_AND_ASSIGN(TopSitesObserver);
};
} // namespace history
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment