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

Side by Side Diff: chrome/browser/ui/webui/snippets_internals_message_handler.cc

Issue 2655263003: [NTP] Remove the ScrollView version of the NTP. (Closed)
Patch Set: Cleaned up some more. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/resources/snippets_internals.html ('k') | components/ntp_snippets/features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/snippets_internals_message_handler.h" 5 #include "chrome/browser/ui/webui/snippets_internals_message_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 SendClassification(); 267 SendClassification();
268 } 268 }
269 269
270 void SnippetsInternalsMessageHandler::FetchRemoteSuggestionsInTheBackground( 270 void SnippetsInternalsMessageHandler::FetchRemoteSuggestionsInTheBackground(
271 const base::ListValue* args) { 271 const base::ListValue* args) {
272 DCHECK_EQ(0u, args->GetSize()); 272 DCHECK_EQ(0u, args->GetSize());
273 remote_suggestions_provider_->RefetchInTheBackground(nullptr); 273 remote_suggestions_provider_->RefetchInTheBackground(nullptr);
274 } 274 }
275 275
276 void SnippetsInternalsMessageHandler::SendAllContent() { 276 void SnippetsInternalsMessageHandler::SendAllContent() {
277 SendBoolean("flag-snippets", base::FeatureList::IsEnabled(
278 ntp_snippets::kContentSuggestionsFeature));
279 SendBoolean( 277 SendBoolean(
280 "flag-article-suggestions", 278 "flag-article-suggestions",
281 base::FeatureList::IsEnabled(ntp_snippets::kArticleSuggestionsFeature)); 279 base::FeatureList::IsEnabled(ntp_snippets::kArticleSuggestionsFeature));
282 SendBoolean("flag-recent-offline-tab-suggestions", 280 SendBoolean("flag-recent-offline-tab-suggestions",
283 base::FeatureList::IsEnabled( 281 base::FeatureList::IsEnabled(
284 ntp_snippets::kRecentOfflineTabSuggestionsFeature)); 282 ntp_snippets::kRecentOfflineTabSuggestionsFeature));
285 SendBoolean("flag-offlining-recent-pages-feature", 283 SendBoolean("flag-offlining-recent-pages-feature",
286 base::FeatureList::IsEnabled( 284 base::FeatureList::IsEnabled(
287 offline_pages::kOffliningRecentPagesFeature)); 285 offline_pages::kOffliningRecentPagesFeature));
288 SendBoolean( 286 SendBoolean(
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 411
414 void SnippetsInternalsMessageHandler::OnDismissedSuggestionsLoaded( 412 void SnippetsInternalsMessageHandler::OnDismissedSuggestionsLoaded(
415 Category category, 413 Category category,
416 std::vector<ContentSuggestion> dismissed_suggestions) { 414 std::vector<ContentSuggestion> dismissed_suggestions) {
417 if (dismissed_state_[category] == DismissedState::HIDDEN) 415 if (dismissed_state_[category] == DismissedState::HIDDEN)
418 return; 416 return;
419 dismissed_suggestions_[category] = std::move(dismissed_suggestions); 417 dismissed_suggestions_[category] = std::move(dismissed_suggestions);
420 dismissed_state_[category] = DismissedState::VISIBLE; 418 dismissed_state_[category] = DismissedState::VISIBLE;
421 SendContentSuggestions(); 419 SendContentSuggestions();
422 } 420 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/snippets_internals.html ('k') | components/ntp_snippets/features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698