| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/thread.h" | 14 #include "base/thread.h" |
| 15 #include "base/utf_string_conversions.h" |
| 15 #include "chrome/browser/browser.h" | 16 #include "chrome/browser/browser.h" |
| 16 #include "chrome/browser/browser_process_impl.h" | 17 #include "chrome/browser/browser_process_impl.h" |
| 17 #include "chrome/browser/platform_util.h" | 18 #include "chrome/browser/platform_util.h" |
| 18 #include "chrome/browser/pref_service.h" | 19 #include "chrome/browser/pref_service.h" |
| 19 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 20 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
| 21 #include "net/base/escape.h" | 22 #include "net/base/escape.h" |
| 22 | 23 |
| 23 // Whether we accept requests for launching external protocols. This is set to | 24 // Whether we accept requests for launching external protocols. This is set to |
| 24 // false every time an external protocol is requested, and set back to true on | 25 // false every time an external protocol is requested, and set back to true on |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // static | 178 // static |
| 178 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) { | 179 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) { |
| 179 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes); | 180 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes); |
| 180 } | 181 } |
| 181 | 182 |
| 182 // static | 183 // static |
| 183 void ExternalProtocolHandler::PermitLaunchUrl() { | 184 void ExternalProtocolHandler::PermitLaunchUrl() { |
| 184 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 185 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
| 185 g_accept_requests = true; | 186 g_accept_requests = true; |
| 186 } | 187 } |
| OLD | NEW |