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

Side by Side Diff: chrome/browser/android/ntp/most_visited_sites_bridge.cc

Issue 2175503002: chrome/browser/android: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/android/download/chrome_download_delegate.cc ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/ntp/most_visited_sites_bridge.h" 5 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 DCHECK(!supervisor_observer_); 57 DCHECK(!supervisor_observer_);
58 else 58 else
59 DCHECK(supervisor_observer_); 59 DCHECK(supervisor_observer_);
60 60
61 supervisor_observer_ = new_observer; 61 supervisor_observer_ = new_observer;
62 } 62 }
63 63
64 bool MostVisitedSitesBridge::SupervisorBridge::IsBlocked(const GURL& url) { 64 bool MostVisitedSitesBridge::SupervisorBridge::IsBlocked(const GURL& url) {
65 SupervisedUserService* supervised_user_service = 65 SupervisedUserService* supervised_user_service =
66 SupervisedUserServiceFactory::GetForProfile(profile_); 66 SupervisedUserServiceFactory::GetForProfile(profile_);
67 auto url_filter = supervised_user_service->GetURLFilterForUIThread(); 67 auto* url_filter = supervised_user_service->GetURLFilterForUIThread();
68 return url_filter->GetFilteringBehaviorForURL(url) == 68 return url_filter->GetFilteringBehaviorForURL(url) ==
69 SupervisedUserURLFilter::FilteringBehavior::BLOCK; 69 SupervisedUserURLFilter::FilteringBehavior::BLOCK;
70 } 70 }
71 71
72 std::vector<MostVisitedSitesSupervisor::Whitelist> 72 std::vector<MostVisitedSitesSupervisor::Whitelist>
73 MostVisitedSitesBridge::SupervisorBridge::whitelists() { 73 MostVisitedSitesBridge::SupervisorBridge::whitelists() {
74 std::vector<MostVisitedSitesSupervisor::Whitelist> results; 74 std::vector<MostVisitedSitesSupervisor::Whitelist> results;
75 SupervisedUserService* supervised_user_service = 75 SupervisedUserService* supervised_user_service =
76 SupervisedUserServiceFactory::GetForProfile(profile_); 76 SupervisedUserServiceFactory::GetForProfile(profile_);
77 for (const auto& whitelist : supervised_user_service->whitelists()) { 77 for (const auto& whitelist : supervised_user_service->whitelists()) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 static jlong Init(JNIEnv* env, 227 static jlong Init(JNIEnv* env,
228 const JavaParamRef<jobject>& obj, 228 const JavaParamRef<jobject>& obj,
229 const JavaParamRef<jobject>& jprofile) { 229 const JavaParamRef<jobject>& jprofile) {
230 MostVisitedSitesBridge* most_visited_sites = 230 MostVisitedSitesBridge* most_visited_sites =
231 new MostVisitedSitesBridge( 231 new MostVisitedSitesBridge(
232 ProfileAndroid::FromProfileAndroid(jprofile)); 232 ProfileAndroid::FromProfileAndroid(jprofile));
233 return reinterpret_cast<intptr_t>(most_visited_sites); 233 return reinterpret_cast<intptr_t>(most_visited_sites);
234 } 234 }
OLDNEW
« no previous file with comments | « chrome/browser/android/download/chrome_download_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698