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

Side by Side Diff: chrome/browser/devtools/browser_list_tabcontents_provider.cc

Issue 126103003: Changed RefCountedStaticMemory() to accept a void pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 10 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/devtools/browser_list_tabcontents_provider.h" 5 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/browser/devtools/devtools_target_impl.h" 9 #include "chrome/browser/devtools/devtools_target_impl.h"
10 #include "chrome/browser/history/top_sites.h" 10 #include "chrome/browser/history/top_sites.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 std::string BrowserListTabContentsProvider::GetPageThumbnailData( 72 std::string BrowserListTabContentsProvider::GetPageThumbnailData(
73 const GURL& url) { 73 const GURL& url) {
74 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 74 for (chrome::BrowserIterator it; !it.done(); it.Next()) {
75 Profile* profile = (*it)->profile(); 75 Profile* profile = (*it)->profile();
76 history::TopSites* top_sites = profile->GetTopSites(); 76 history::TopSites* top_sites = profile->GetTopSites();
77 if (!top_sites) 77 if (!top_sites)
78 continue; 78 continue;
79 scoped_refptr<base::RefCountedMemory> data; 79 scoped_refptr<base::RefCountedMemory> data;
80 if (top_sites->GetPageThumbnail(url, false, &data)) 80 if (top_sites->GetPageThumbnail(url, false, &data))
81 return std::string( 81 return std::string(data->front_as<char>(), data->size());
82 reinterpret_cast<const char*>(data->front()), data->size());
83 } 82 }
84 83
85 return std::string(); 84 return std::string();
86 } 85 }
87 86
88 scoped_ptr<DevToolsTarget> 87 scoped_ptr<DevToolsTarget>
89 BrowserListTabContentsProvider::CreateNewTarget(const GURL& url) { 88 BrowserListTabContentsProvider::CreateNewTarget(const GURL& url) {
90 const BrowserList* browser_list = 89 const BrowserList* browser_list =
91 BrowserList::GetInstance(host_desktop_type_); 90 BrowserList::GetInstance(host_desktop_type_);
92 WebContents* web_contents; 91 WebContents* web_contents;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 .PassAs<net::StreamListenSocket>(); 131 .PassAs<net::StreamListenSocket>();
133 } 132 }
134 #else 133 #else
135 scoped_ptr<net::StreamListenSocket> 134 scoped_ptr<net::StreamListenSocket>
136 BrowserListTabContentsProvider::CreateSocketForTethering( 135 BrowserListTabContentsProvider::CreateSocketForTethering(
137 net::StreamListenSocket::Delegate* delegate, 136 net::StreamListenSocket::Delegate* delegate,
138 std::string* name) { 137 std::string* name) {
139 return scoped_ptr<net::StreamListenSocket>(); 138 return scoped_ptr<net::StreamListenSocket>();
140 } 139 }
141 #endif // defined(DEBUG_DEVTOOLS) 140 #endif // defined(DEBUG_DEVTOOLS)
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_html_writer.cc ('k') | chrome/browser/local_discovery/privet_http_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698