OLD | NEW |
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/ui/webui/ntp/suggestions_source_discovery.h" | 5 #include "chrome/browser/ui/webui/ntp/suggestions_source_discovery.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/extensions/api/discovery/suggested_link.h" | 16 #include "chrome/browser/extensions/api/discovery/suggested_link.h" |
17 #include "chrome/browser/extensions/api/discovery/suggested_links_registry.h" | 17 #include "chrome/browser/extensions/api/discovery/suggested_links_registry.h" |
18 #include "chrome/browser/extensions/api/discovery/suggested_links_registry_facto
ry.h" | 18 #include "chrome/browser/extensions/api/discovery/suggested_links_registry_facto
ry.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 20 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
21 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h" | 21 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h" |
22 #include "net/base/load_flags.h" | 22 #include "net/base/load_flags.h" |
23 | 23 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 page_value->SetString("urlImage", url_image); | 81 page_value->SetString("urlImage", url_image); |
82 items_.push_back(page_value); | 82 items_.push_back(page_value); |
83 } | 83 } |
84 combiner_->OnItemsReady(); | 84 combiner_->OnItemsReady(); |
85 } | 85 } |
86 | 86 |
87 void SuggestionsSourceDiscovery::SetCombiner(SuggestionsCombiner* combiner) { | 87 void SuggestionsSourceDiscovery::SetCombiner(SuggestionsCombiner* combiner) { |
88 DCHECK(!combiner_); | 88 DCHECK(!combiner_); |
89 combiner_ = combiner; | 89 combiner_ = combiner; |
90 } | 90 } |
OLD | NEW |