| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/external_protocol_dialog.h" | 5 #include "chrome/browser/views/external_protocol_dialog.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/message_box_flags.h" | 8 #include "app/message_box_flags.h" |
| 9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
| 10 #include "base/registry.h" | 10 #include "base/registry.h" |
| 11 #include "base/string_util.h" | |
| 12 #include "base/thread.h" | 11 #include "base/thread.h" |
| 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/external_protocol_handler.h" | 14 #include "chrome/browser/external_protocol_handler.h" |
| 15 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
| 16 #include "chrome/browser/tab_contents/tab_util.h" | 16 #include "chrome/browser/tab_contents/tab_util.h" |
| 17 #include "grit/chromium_strings.h" | 17 #include "grit/chromium_strings.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 #include "views/controls/message_box_view.h" | 19 #include "views/controls/message_box_view.h" |
| 20 #include "views/window/window.h" | 20 #include "views/window/window.h" |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 std::wstring parameters = url_spec.substr(split_offset + 1, | 158 std::wstring parameters = url_spec.substr(split_offset + 1, |
| 159 url_spec.length() - 1); | 159 url_spec.length() - 1); |
| 160 std::wstring application_to_launch; | 160 std::wstring application_to_launch; |
| 161 if (cmd_key.ReadValue(NULL, &application_to_launch)) { | 161 if (cmd_key.ReadValue(NULL, &application_to_launch)) { |
| 162 ReplaceSubstringsAfterOffset(&application_to_launch, 0, L"%1", parameters); | 162 ReplaceSubstringsAfterOffset(&application_to_launch, 0, L"%1", parameters); |
| 163 return application_to_launch; | 163 return application_to_launch; |
| 164 } else { | 164 } else { |
| 165 return std::wstring(); | 165 return std::wstring(); |
| 166 } | 166 } |
| 167 } | 167 } |
| OLD | NEW |