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

Unified Diff: chrome/browser/ui/webui/ntp/thumbnail_source.cc

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another rebase Created 7 years, 9 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/ui/webui/ntp/thumbnail_source.h ('k') | chrome/browser/ui/webui/theme_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/thumbnail_source.cc
diff --git a/chrome/browser/ui/webui/ntp/thumbnail_source.cc b/chrome/browser/ui/webui/ntp/thumbnail_source.cc
index 561adb5cb88054244e7996f9b7cc95f344515dca..706b760592df07346b0058a3aa2c0cbb9eee0d0b 100644
--- a/chrome/browser/ui/webui/ntp/thumbnail_source.cc
+++ b/chrome/browser/ui/webui/ntp/thumbnail_source.cc
@@ -7,12 +7,14 @@
#include "base/callback.h"
#include "base/message_loop.h"
#include "base/memory/ref_counted_memory.h"
+#include "chrome/browser/instant/instant_io_context.h"
#include "chrome/browser/thumbnails/thumbnail_service.h"
#include "chrome/browser/thumbnails/thumbnail_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
#include "grit/theme_resources.h"
+#include "net/url_request/url_request.h"
#include "ui/base/resource/resource_bundle.h"
// Set ThumbnailService now as Profile isn't thread safe.
@@ -52,3 +54,10 @@ MessageLoop* ThumbnailSource::MessageLoopForRequestPath(
return thumbnail_service_.get() ?
NULL : content::URLDataSource::MessageLoopForRequestPath(path);
}
+
+bool ThumbnailSource::ShouldServiceRequest(
+ const net::URLRequest* request) const {
+ if (request->url().SchemeIs(chrome::kChromeSearchScheme))
+ return InstantIOContext::ShouldServiceRequest(request);
+ return URLDataSource::ShouldServiceRequest(request);
+}
« no previous file with comments | « chrome/browser/ui/webui/ntp/thumbnail_source.h ('k') | chrome/browser/ui/webui/theme_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698