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

Side by Side Diff: ios/chrome/browser/content_suggestions/mediator_util.mm

Issue 2890193003: Open Most Visited items (Closed)
Patch Set: Fix showcase Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import "ios/chrome/browser/content_suggestions/mediator_util.h" 5 #import "ios/chrome/browser/content_suggestions/mediator_util.h"
6 6
7 #include "base/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #include "components/ntp_snippets/category.h" 8 #include "components/ntp_snippets/category.h"
9 #include "components/ntp_tiles/metrics.h" 9 #include "components/ntp_tiles/metrics.h"
10 #include "components/rappor/rappor_service_impl.h" 10 #include "components/rappor/rappor_service_impl.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 ContentSuggestionsMostVisitedItem* ConvertNTPTile( 125 ContentSuggestionsMostVisitedItem* ConvertNTPTile(
126 const ntp_tiles::NTPTile& tile, 126 const ntp_tiles::NTPTile& tile,
127 ContentSuggestionsSectionInformation* sectionInfo) { 127 ContentSuggestionsSectionInformation* sectionInfo) {
128 ContentSuggestionsMostVisitedItem* suggestion = 128 ContentSuggestionsMostVisitedItem* suggestion =
129 [[ContentSuggestionsMostVisitedItem alloc] initWithType:0]; 129 [[ContentSuggestionsMostVisitedItem alloc] initWithType:0];
130 130
131 suggestion.title = base::SysUTF16ToNSString(tile.title); 131 suggestion.title = base::SysUTF16ToNSString(tile.title);
132 suggestion.URL = tile.url; 132 suggestion.URL = tile.url;
133 suggestion.source = tile.source;
133 134
134 suggestion.suggestionIdentifier = [[ContentSuggestionIdentifier alloc] init]; 135 suggestion.suggestionIdentifier = [[ContentSuggestionIdentifier alloc] init];
135 suggestion.suggestionIdentifier.IDInSection = tile.url.spec(); 136 suggestion.suggestionIdentifier.IDInSection = tile.url.spec();
136 suggestion.suggestionIdentifier.sectionInfo = sectionInfo; 137 suggestion.suggestionIdentifier.sectionInfo = sectionInfo;
137 138
138 return suggestion; 139 return suggestion;
139 } 140 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698