| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/external_protocol_handler.h" | 5 #include "chrome/browser/external_protocol_handler.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 return; | 166 return; |
| 167 } | 167 } |
| 168 | 168 |
| 169 loop->PostTask(FROM_HERE, | 169 loop->PostTask(FROM_HERE, |
| 170 NewRunnableFunction(&platform_util::OpenExternal, url)); | 170 NewRunnableFunction(&platform_util::OpenExternal, url)); |
| 171 #endif | 171 #endif |
| 172 } | 172 } |
| 173 | 173 |
| 174 // static | 174 // static |
| 175 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) { | 175 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) { |
| 176 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes); | 176 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes, |
| 177 false /* don't sync pref */); |
| 177 } | 178 } |
| 178 | 179 |
| 179 // static | 180 // static |
| 180 void ExternalProtocolHandler::PermitLaunchUrl() { | 181 void ExternalProtocolHandler::PermitLaunchUrl() { |
| 181 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 182 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
| 182 g_accept_requests = true; | 183 g_accept_requests = true; |
| 183 } | 184 } |
| OLD | NEW |