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

Side by Side Diff: chrome/browser/ui/webui/ntp/thumbnail_source.cc

Issue 454583002: Cleanup: Remove unneeded #includes for grit/, ui/base/l10n/l10n_util.h and ui/base/resource/resourc… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Cros some more Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" 5 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/search/instant_io_context.h" 11 #include "chrome/browser/search/instant_io_context.h"
12 #include "chrome/browser/thumbnails/thumbnail_service.h" 12 #include "chrome/browser/thumbnails/thumbnail_service.h"
13 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" 13 #include "chrome/browser/thumbnails/thumbnail_service_factory.h"
14 #include "chrome/common/url_constants.h" 14 #include "chrome/common/url_constants.h"
15 #include "grit/theme_resources.h"
16 #include "net/url_request/url_request.h" 15 #include "net/url_request/url_request.h"
17 #include "ui/base/resource/resource_bundle.h"
18 #include "url/gurl.h" 16 #include "url/gurl.h"
19 17
20 using content::BrowserThread; 18 using content::BrowserThread;
21 19
22 // Set ThumbnailService now as Profile isn't thread safe. 20 // Set ThumbnailService now as Profile isn't thread safe.
23 ThumbnailSource::ThumbnailSource(Profile* profile, bool capture_thumbnails) 21 ThumbnailSource::ThumbnailSource(Profile* profile, bool capture_thumbnails)
24 : thumbnail_service_(ThumbnailServiceFactory::GetForProfile(profile)), 22 : thumbnail_service_(ThumbnailServiceFactory::GetForProfile(profile)),
25 profile_(profile), 23 profile_(profile),
26 capture_thumbnails_(capture_thumbnails) { 24 capture_thumbnails_(capture_thumbnails) {
27 } 25 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return thumbnail_service_.get() ? 61 return thumbnail_service_.get() ?
64 NULL : content::URLDataSource::MessageLoopForRequestPath(path); 62 NULL : content::URLDataSource::MessageLoopForRequestPath(path);
65 } 63 }
66 64
67 bool ThumbnailSource::ShouldServiceRequest( 65 bool ThumbnailSource::ShouldServiceRequest(
68 const net::URLRequest* request) const { 66 const net::URLRequest* request) const {
69 if (request->url().SchemeIs(chrome::kChromeSearchScheme)) 67 if (request->url().SchemeIs(chrome::kChromeSearchScheme))
70 return InstantIOContext::ShouldServiceRequest(request); 68 return InstantIOContext::ShouldServiceRequest(request);
71 return URLDataSource::ShouldServiceRequest(request); 69 return URLDataSource::ShouldServiceRequest(request);
72 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698