Home | History | Annotate | Download | only in history
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_
      6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_
      7 
      8 #include "base/macros.h"
      9 #include "components/history/core/browser/history_client.h"
     10 
     11 class BookmarkModel;
     12 
     13 // This class implements history::HistoryClient to abstract operations that
     14 // depend on Chrome environment.
     15 class ChromeHistoryClient : public history::HistoryClient {
     16  public:
     17   explicit ChromeHistoryClient(BookmarkModel* bookmark_model);
     18 
     19   // history::HistoryClient:
     20   virtual void BlockUntilBookmarksLoaded() OVERRIDE;
     21   virtual bool IsBookmarked(const GURL& url) OVERRIDE;
     22   virtual void GetBookmarks(
     23       std::vector<history::URLAndTitle>* bookmarks) OVERRIDE;
     24   virtual void NotifyProfileError(sql::InitStatus init_status) OVERRIDE;
     25 
     26   // KeyedService:
     27   virtual void Shutdown() OVERRIDE;
     28 
     29  private:
     30   // The BookmarkModel, this should outlive ChromeHistoryClient.
     31   BookmarkModel* bookmark_model_;
     32 
     33   DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient);
     34 };
     35 
     36 #endif  // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_
     37