| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // static | 99 // static |
| 100 void TipsHandler::RegisterUserPrefs(PrefService* prefs) { | 100 void TipsHandler::RegisterUserPrefs(PrefService* prefs) { |
| 101 prefs->RegisterDictionaryPref(prefs::kNTPWebResourceCache); | 101 prefs->RegisterDictionaryPref(prefs::kNTPWebResourceCache); |
| 102 prefs->RegisterStringPref(prefs::kNTPWebResourceServer, | 102 prefs->RegisterStringPref(prefs::kNTPWebResourceServer, |
| 103 WebResourceService::kDefaultWebResourceServer); | 103 WebResourceService::kDefaultWebResourceServer); |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool TipsHandler::IsValidURL(const std::wstring& url_string) { | 106 bool TipsHandler::IsValidURL(const std::wstring& url_string) { |
| 107 GURL url(WideToUTF8(url_string)); | 107 GURL url(WideToUTF8(url_string)); |
| 108 return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) || | 108 return !url.is_empty() && (url.SchemeIs(chrome::kHttpScheme) || |
| 109 url.SchemeIs(chrome::kHttpsScheme)); | 109 url.SchemeIs(chrome::kHttpsScheme) || |
| 110 url.SchemeIs(chrome::kHttpsvScheme)); |
| 110 } | 111 } |
| OLD | NEW |