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

Side by Side Diff: chrome/browser/search/thumbnail_source.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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/search/thumbnail_source.h" 5 #include "chrome/browser/search/thumbnail_source.h"
6 6
7 #include <stddef.h>
8
7 #include "base/callback.h" 9 #include "base/callback.h"
8 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
9 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/search/instant_io_context.h" 13 #include "chrome/browser/search/instant_io_context.h"
12 #include "chrome/browser/search/suggestions/image_fetcher_impl.h" 14 #include "chrome/browser/search/suggestions/image_fetcher_impl.h"
13 #include "chrome/browser/thumbnails/thumbnail_service.h" 15 #include "chrome/browser/thumbnails/thumbnail_service.h"
14 #include "chrome/browser/thumbnails/thumbnail_service_factory.h" 16 #include "chrome/browser/thumbnails/thumbnail_service_factory.h"
15 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
16 #include "components/suggestions/image_encoder.h" 18 #include "components/suggestions/image_encoder.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 119
118 scoped_refptr<base::RefCountedBytes> encoded_data( 120 scoped_refptr<base::RefCountedBytes> encoded_data(
119 new base::RefCountedBytes()); 121 new base::RefCountedBytes());
120 if (!suggestions::EncodeSkBitmapToJPEG(*bitmap, &encoded_data->data())) { 122 if (!suggestions::EncodeSkBitmapToJPEG(*bitmap, &encoded_data->data())) {
121 callback.Run(default_thumbnail_.get()); 123 callback.Run(default_thumbnail_.get());
122 return; 124 return;
123 } 125 }
124 126
125 callback.Run(encoded_data.get()); 127 callback.Run(encoded_data.get());
126 } 128 }
OLDNEW
« no previous file with comments | « chrome/browser/search/thumbnail_source.h ('k') | chrome/browser/search_engines/chrome_template_url_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698