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

Side by Side Diff: ios/chrome/browser/history/history_backend_client_impl.cc

Issue 1924773002: TopSites: filter out non-WebSafe URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@topsites_cleanup
Patch Set: comment Created 4 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
« no previous file with comments | « ios/chrome/browser/history/history_backend_client_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/history/history_backend_client_impl.h" 5 #include "ios/chrome/browser/history/history_backend_client_impl.h"
6 6
7 #include "components/bookmarks/browser/bookmark_model.h" 7 #include "components/bookmarks/browser/bookmark_model.h"
8 #include "url/gurl.h" 8 #include "url/gurl.h"
9 9
10 HistoryBackendClientImpl::HistoryBackendClientImpl( 10 HistoryBackendClientImpl::HistoryBackendClientImpl(
(...skipping 30 matching lines...) Expand all
41 bookmarks->reserve(bookmarks->size() + url_and_titles.size()); 41 bookmarks->reserve(bookmarks->size() + url_and_titles.size());
42 for (const auto& url_and_title : url_and_titles) { 42 for (const auto& url_and_title : url_and_titles) {
43 history::URLAndTitle value = {url_and_title.url, url_and_title.title}; 43 history::URLAndTitle value = {url_and_title.url, url_and_title.title};
44 bookmarks->push_back(value); 44 bookmarks->push_back(value);
45 } 45 }
46 } 46 }
47 47
48 bool HistoryBackendClientImpl::ShouldReportDatabaseError() { 48 bool HistoryBackendClientImpl::ShouldReportDatabaseError() {
49 return false; 49 return false;
50 } 50 }
51
52 bool HistoryBackendClientImpl::IsWebSafe(const GURL& url) {
53 return url.SchemeIsHTTPOrHTTPS();
54 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/history/history_backend_client_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698