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 "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/threading/thread.h" |
15 #include "chrome/browser/browser_process_impl.h" | 15 #include "chrome/browser/browser_process_impl.h" |
16 #include "chrome/browser/platform_util.h" | 16 #include "chrome/browser/platform_util.h" |
17 #include "chrome/browser/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
21 #include "net/base/escape.h" | 21 #include "net/base/escape.h" |
22 | 22 |
23 // Whether we accept requests for launching external protocols. This is set to | 23 // 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 | 24 // 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 | 177 // static |
178 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) { | 178 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) { |
179 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes); | 179 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes); |
180 } | 180 } |
181 | 181 |
182 // static | 182 // static |
183 void ExternalProtocolHandler::PermitLaunchUrl() { | 183 void ExternalProtocolHandler::PermitLaunchUrl() { |
184 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 184 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
185 g_accept_requests = true; | 185 g_accept_requests = true; |
186 } | 186 } |
OLD | NEW |