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

Side by Side Diff: chrome/browser/extensions/api/top_sites/top_sites_api.cc

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: Fix typo Created 5 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/extensions/api/top_sites/top_sites_api.h" 5 #include "chrome/browser/extensions/api/top_sites/top_sites_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"
10 #include "chrome/browser/history/top_sites_factory.h" 9 #include "chrome/browser/history/top_sites_factory.h"
11 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 11 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
12 #include "components/history/core/browser/top_sites.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 TopSitesGetFunction::TopSitesGetFunction() 16 TopSitesGetFunction::TopSitesGetFunction()
17 : weak_ptr_factory_(this) {} 17 : weak_ptr_factory_(this) {}
18 18
19 TopSitesGetFunction::~TopSitesGetFunction() {} 19 TopSitesGetFunction::~TopSitesGetFunction() {}
20 20
21 bool TopSitesGetFunction::RunAsync() { 21 bool TopSitesGetFunction::RunAsync() {
22 scoped_refptr<history::TopSites> ts = 22 scoped_refptr<history::TopSites> ts =
(...skipping 21 matching lines...) Expand all
44 page_value->SetString("title", url.title); 44 page_value->SetString("title", url.title);
45 pages_value->Append(page_value); 45 pages_value->Append(page_value);
46 } 46 }
47 } 47 }
48 48
49 SetResult(pages_value.release()); 49 SetResult(pages_value.release());
50 SendResponse(true); 50 SendResponse(true);
51 } 51 }
52 52
53 } // namespace extensions 53 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698