OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/thumbnails/thumbnail_list_source.h" | 5 #include "chrome/browser/thumbnails/thumbnail_list_source.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 | 10 |
9 #include "base/base64.h" | 11 #include "base/base64.h" |
10 #include "base/bind.h" | 12 #include "base/bind.h" |
11 #include "base/logging.h" | 13 #include "base/logging.h" |
12 #include "base/memory/ref_counted_memory.h" | 14 #include "base/memory/ref_counted_memory.h" |
13 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
14 #include "chrome/browser/history/top_sites_factory.h" | 16 #include "chrome/browser/history/top_sites_factory.h" |
15 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/search/instant_io_context.h" | 18 #include "chrome/browser/search/instant_io_context.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 162 } |
161 if (num_mv_with_thumb < num_mv) { | 163 if (num_mv_with_thumb < num_mv) { |
162 out.push_back("<h2>TopSites URLs without Thumbnails</h2>\n"); | 164 out.push_back("<h2>TopSites URLs without Thumbnails</h2>\n"); |
163 RenderMostVisitedURLList(mvurl_list, base64_encoded_pngs, false, &out); | 165 RenderMostVisitedURLList(mvurl_list, base64_encoded_pngs, false, &out); |
164 } | 166 } |
165 out.push_back(kHtmlFooter); | 167 out.push_back(kHtmlFooter); |
166 | 168 |
167 std::string out_html = base::JoinString(out, base::StringPiece()); | 169 std::string out_html = base::JoinString(out, base::StringPiece()); |
168 callback.Run(base::RefCountedString::TakeString(&out_html)); | 170 callback.Run(base::RefCountedString::TakeString(&out_html)); |
169 } | 171 } |
OLD | NEW |