| OLD | NEW |
| 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/external_protocol/external_protocol_handler.h" | 5 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 ExternalProtocolHandler::Delegate* delegate_; | 141 ExternalProtocolHandler::Delegate* delegate_; |
| 142 GURL escaped_url_; | 142 GURL escaped_url_; |
| 143 int render_process_host_id_; | 143 int render_process_host_id_; |
| 144 int tab_contents_id_; | 144 int tab_contents_id_; |
| 145 bool prompt_user_; | 145 bool prompt_user_; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace | 148 } // namespace |
| 149 | 149 |
| 150 // static | 150 // static |
| 151 void ExternalProtocolHandler::PrepopulateDictionary(DictionaryValue* win_pref) { | 151 void ExternalProtocolHandler::PrepopulateDictionary( |
| 152 base::DictionaryValue* win_pref) { |
| 152 static bool is_warm = false; | 153 static bool is_warm = false; |
| 153 if (is_warm) | 154 if (is_warm) |
| 154 return; | 155 return; |
| 155 is_warm = true; | 156 is_warm = true; |
| 156 | 157 |
| 157 static const char* const denied_schemes[] = { | 158 static const char* const denied_schemes[] = { |
| 158 "afp", | 159 "afp", |
| 159 "data", | 160 "data", |
| 160 "disk", | 161 "disk", |
| 161 "disks", | 162 "disks", |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // static | 307 // static |
| 307 void ExternalProtocolHandler::RegisterPrefs(PrefRegistrySimple* registry) { | 308 void ExternalProtocolHandler::RegisterPrefs(PrefRegistrySimple* registry) { |
| 308 registry->RegisterDictionaryPref(prefs::kExcludedSchemes); | 309 registry->RegisterDictionaryPref(prefs::kExcludedSchemes); |
| 309 } | 310 } |
| 310 | 311 |
| 311 // static | 312 // static |
| 312 void ExternalProtocolHandler::PermitLaunchUrl() { | 313 void ExternalProtocolHandler::PermitLaunchUrl() { |
| 313 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); | 314 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); |
| 314 g_accept_requests = true; | 315 g_accept_requests = true; |
| 315 } | 316 } |
| OLD | NEW |