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

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

Issue 6756001: Removing 'off the record' references. Contributed by vipul.bhasin@gmail.com (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removing off the record references from the code Created 9 years, 8 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
« no previous file with comments | « chrome/browser/ui/webui/thumbnail_source.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/thumbnail_source.h" 5 #include "chrome/browser/ui/webui/thumbnail_source.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "chrome/browser/history/top_sites.h" 8 #include "chrome/browser/history/top_sites.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "grit/theme_resources.h" 12 #include "grit/theme_resources.h"
13 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
14 14
15 ThumbnailSource::ThumbnailSource(Profile* profile) 15 ThumbnailSource::ThumbnailSource(Profile* profile)
16 : DataSource(chrome::kChromeUIThumbnailPath, MessageLoop::current()), 16 : DataSource(chrome::kChromeUIThumbnailPath, MessageLoop::current()),
17 // Set TopSites now as Profile isn't thread safe. 17 // Set TopSites now as Profile isn't thread safe.
18 top_sites_(profile->GetTopSites()) { 18 top_sites_(profile->GetTopSites()) {
19 } 19 }
20 20
21 ThumbnailSource::~ThumbnailSource() { 21 ThumbnailSource::~ThumbnailSource() {
22 } 22 }
23 23
24 void ThumbnailSource::StartDataRequest(const std::string& path, 24 void ThumbnailSource::StartDataRequest(const std::string& path,
25 bool is_off_the_record, 25 bool is_incognito,
26 int request_id) { 26 int request_id) {
27 scoped_refptr<RefCountedBytes> data; 27 scoped_refptr<RefCountedBytes> data;
28 if (top_sites_->GetPageThumbnail(GURL(path), &data)) { 28 if (top_sites_->GetPageThumbnail(GURL(path), &data)) {
29 // We have the thumbnail. 29 // We have the thumbnail.
30 SendResponse(request_id, data.get()); 30 SendResponse(request_id, data.get());
31 } else { 31 } else {
32 SendDefaultThumbnail(request_id); 32 SendDefaultThumbnail(request_id);
33 } 33 }
34 } 34 }
35 35
(...skipping 11 matching lines...) Expand all
47 47
48 void ThumbnailSource::SendDefaultThumbnail(int request_id) { 48 void ThumbnailSource::SendDefaultThumbnail(int request_id) {
49 // Use placeholder thumbnail. 49 // Use placeholder thumbnail.
50 if (!default_thumbnail_.get()) { 50 if (!default_thumbnail_.get()) {
51 default_thumbnail_ = 51 default_thumbnail_ =
52 ResourceBundle::GetSharedInstance().LoadDataResourceBytes( 52 ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
53 IDR_DEFAULT_THUMBNAIL); 53 IDR_DEFAULT_THUMBNAIL);
54 } 54 }
55 SendResponse(request_id, default_thumbnail_); 55 SendResponse(request_id, default_thumbnail_);
56 } 56 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/thumbnail_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698