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

Unified Diff: chrome/browser/ui/app_list/search/webstore_cache.h

Issue 23874015: Implement people search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/search/webstore_cache.h
diff --git a/chrome/browser/ui/app_list/search/webstore_cache.h b/chrome/browser/ui/app_list/search/webstore_cache.h
deleted file mode 100644
index 4890c3368f35247597c71e5d35f6ef077cc19aa5..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/app_list/search/webstore_cache.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_CACHE_H_
-#define CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_CACHE_H_
-
-#include <utility>
-
-#include "base/basictypes.h"
-#include "base/containers/mru_cache.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/time/time.h"
-
-namespace base {
-class DictionaryValue;
-}
-
-namespace app_list {
-
-// WebstoreCache manages the cache of webstore search results which should
-// be valid during an input session. This will reduce unnecessary queries
-// for typing backspace or so on.
-class WebstoreCache {
- public:
- WebstoreCache();
- ~WebstoreCache();
-
- // Checks the current cache and returns the value for the |query| if it's
- // valid. Otherwise returns NULL.
- const base::DictionaryValue* Get(const std::string& query);
-
- // Puts the new result to the query.
- void Put(const std::string& query, scoped_ptr<base::DictionaryValue> result);
-
- private:
- typedef std::pair<base::Time, base::DictionaryValue*> Payload;
- class CacheDeletor {
- public:
- void operator()(Payload& payload);
- };
- typedef base::MRUCacheBase<std::string, Payload, CacheDeletor> Cache;
-
- Cache cache_;
-
- DISALLOW_COPY_AND_ASSIGN(WebstoreCache);
-};
-
-} // namespace app_list
-
-#endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_CACHE_H_

Powered by Google App Engine
This is Rietveld 408576698