Implement nacl_irt_memory for non-sfi mode.
[chromium-blink-merge.git] / chrome / test / base / history_index_restore_observer.h
blob3f03377f2652b3622787a0c1173fc9eb85ba8258
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
3 // found in the LICENSE file.
5 #ifndef CHROME_TEST_BASE_HISTORY_INDEX_RESTORE_OBSERVER_H_
6 #define CHROME_TEST_BASE_HISTORY_INDEX_RESTORE_OBSERVER_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/history/in_memory_url_index.h"
13 // HistoryIndexRestoreObserver is used when blocking until the InMemoryURLIndex
14 // finishes restoring. As soon as the InMemoryURLIndex finishes restoring the
15 // provided Closure is invoked.
16 class HistoryIndexRestoreObserver
17 : public history::InMemoryURLIndex::RestoreCacheObserver {
18 public:
19 explicit HistoryIndexRestoreObserver(const base::Closure& task);
20 virtual ~HistoryIndexRestoreObserver();
22 bool succeeded() const { return succeeded_; }
24 // RestoreCacheObserver implementation.
25 virtual void OnCacheRestoreFinished(bool success) OVERRIDE;
27 private:
28 base::Closure task_;
29 bool succeeded_;
31 DISALLOW_COPY_AND_ASSIGN(HistoryIndexRestoreObserver);
34 #endif // CHROME_TEST_BASE_HISTORY_INDEX_RESTORE_OBSERVER_H_