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

Side by Side Diff: chrome/browser/google/google_util.cc

Issue 11186002: Add a SafeSearch preference, policy and implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor improvement and bugfix. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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/google/google_util.h" 5 #include "chrome/browser/google/google_util.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 bool IsInternetCafeBrandCode(const std::string& brand) { 315 bool IsInternetCafeBrandCode(const std::string& brand) {
316 const char* const kBrands[] = { 316 const char* const kBrands[] = {
317 "CHIQ", "CHSG", "HLJY", "NTMO", "OOBA", "OOBB", "OOBC", "OOBD", "OOBE", 317 "CHIQ", "CHSG", "HLJY", "NTMO", "OOBA", "OOBB", "OOBC", "OOBD", "OOBE",
318 "OOBF", "OOBG", "OOBH", "OOBI", "OOBJ", "IDCM", 318 "OOBF", "OOBG", "OOBH", "OOBI", "OOBJ", "IDCM",
319 }; 319 };
320 const char* const* end = &kBrands[arraysize(kBrands)]; 320 const char* const* end = &kBrands[arraysize(kBrands)];
321 const char* const* found = std::find(&kBrands[0], end, brand); 321 const char* const* found = std::find(&kBrands[0], end, brand);
322 return found != end; 322 return found != end;
323 } 323 }
324 324
325 bool SupportsSafeSearch(const std::string& url) {
326 return IsGoogleSearchUrl(url) || IsGoogleHomePageUrl(url);
Peter Kasting 2012/11/02 20:59:11 Don't add this. Have the lone caller check these
Sergiu 2012/11/02 22:09:58 Removed and added it back as direct call.
327 }
328
325 } // namespace google_util 329 } // namespace google_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698