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

Side by Side Diff: chrome/browser/history/top_sites_extension_api.cc

Issue 10071032: RefCounted types should not have public destructors, chrome/browser/ part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation fixes Created 8 years, 7 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/history/top_sites_extension_api.h" 5 #include "chrome/browser/history/top_sites_extension_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/history/top_sites.h" 9 #include "chrome/browser/history/top_sites.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 11 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
12 12
13 GetTopSitesFunction::GetTopSitesFunction() { 13 GetTopSitesFunction::GetTopSitesFunction() {}
14 }
15 14
16 GetTopSitesFunction::~GetTopSitesFunction() { 15 GetTopSitesFunction::~GetTopSitesFunction() {}
17 }
18 16
19 bool GetTopSitesFunction::RunImpl() { 17 bool GetTopSitesFunction::RunImpl() {
20 history::TopSites* ts = profile()->GetTopSites(); 18 history::TopSites* ts = profile()->GetTopSites();
21 if (!ts) 19 if (!ts)
22 return false; 20 return false;
23 21
24 ts->GetMostVisitedURLs( 22 ts->GetMostVisitedURLs(
25 &topsites_consumer_, 23 &topsites_consumer_,
26 base::Bind(&GetTopSitesFunction::OnMostVisitedURLsAvailable, this)); 24 base::Bind(&GetTopSitesFunction::OnMostVisitedURLsAvailable, this));
27 return true; 25 return true;
(...skipping 11 matching lines...) Expand all
39 page_value->SetString("title", url.url.spec()); 37 page_value->SetString("title", url.url.spec());
40 else 38 else
41 page_value->SetString("title", url.title); 39 page_value->SetString("title", url.title);
42 pages_value->Append(page_value); 40 pages_value->Append(page_value);
43 } 41 }
44 } 42 }
45 43
46 result_.reset(pages_value.release()); 44 result_.reset(pages_value.release());
47 SendResponse(true); 45 SendResponse(true);
48 } 46 }
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_extension_api.h ('k') | chrome/browser/history/top_sites_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698