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

Unified Diff: chrome/browser/search/thumbnail_source.h

Issue 1151563005: Revert of NTP Zombie Code Slayer Part IV: Most Visited (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « chrome/browser/search/instant_service.cc ('k') | chrome/browser/search/thumbnail_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/thumbnail_source.h
diff --git a/chrome/browser/search/thumbnail_source.h b/chrome/browser/search/thumbnail_source.h
deleted file mode 100644
index 4bf5072e4bd11754e6fb571c60bb01bee366c46c..0000000000000000000000000000000000000000
--- a/chrome/browser/search/thumbnail_source.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2012 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_SEARCH_THUMBNAIL_SOURCE_H_
-#define CHROME_BROWSER_SEARCH_THUMBNAIL_SOURCE_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
-#include "content/public/browser/url_data_source.h"
-
-class Profile;
-
-namespace base {
-class RefCountedMemory;
-}
-
-namespace thumbnails {
-class ThumbnailService;
-}
-
-// ThumbnailSource is the gateway between network-level chrome: requests for
-// thumbnails and the history/top-sites backend that serves these.
-class ThumbnailSource : public content::URLDataSource {
- public:
- ThumbnailSource(Profile* profile, bool capture_thumbnails);
-
- // content::URLDataSource implementation.
- std::string GetSource() const override;
- void StartDataRequest(
- const std::string& path,
- int render_process_id,
- int render_frame_id,
- const content::URLDataSource::GotDataCallback& callback) override;
- std::string GetMimeType(const std::string& path) const override;
- base::MessageLoop* MessageLoopForRequestPath(
- const std::string& path) const override;
- bool ShouldServiceRequest(const net::URLRequest* request) const override;
-
- private:
- ~ThumbnailSource() override;
-
- // Raw PNG representation of the thumbnail to show when the thumbnail
- // database doesn't have a thumbnail for a webpage.
- scoped_refptr<base::RefCountedMemory> default_thumbnail_;
-
- // ThumbnailService.
- scoped_refptr<thumbnails::ThumbnailService> thumbnail_service_;
-
- // Indicate that, when a URL for which we don't have a thumbnail is requested
- // from this source, then Chrome should capture a thumbnail next time it
- // navigates to this URL. This is useful when the thumbnail URLs are generated
- // by an external service rather than TopSites, so Chrome can learn about the
- // URLs for which it should get thumbnails. Sources that capture thumbnails
- // are also be more lenient when matching thumbnail URLs by checking for
- // existing thumbnails in the database that contain a URL matching the prefix
- // of the requested URL.
- const bool capture_thumbnails_;
-
- DISALLOW_COPY_AND_ASSIGN(ThumbnailSource);
-};
-
-#endif // CHROME_BROWSER_SEARCH_THUMBNAIL_SOURCE_H_
« no previous file with comments | « chrome/browser/search/instant_service.cc ('k') | chrome/browser/search/thumbnail_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698