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/views/external_protocol_dialog.h" | 5 #include "chrome/browser/views/external_protocol_dialog.h" |
6 | 6 |
| 7 #include "app/l10n_util.h" |
7 #include "base/histogram.h" | 8 #include "base/histogram.h" |
8 #include "base/registry.h" | 9 #include "base/registry.h" |
9 #include "base/string_util.h" | 10 #include "base/string_util.h" |
10 #include "base/thread.h" | 11 #include "base/thread.h" |
11 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/external_protocol_handler.h" | 13 #include "chrome/browser/external_protocol_handler.h" |
13 #include "chrome/browser/tab_contents/tab_util.h" | 14 #include "chrome/browser/tab_contents/tab_util.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/common/l10n_util.h" | |
16 #include "chrome/common/message_box_flags.h" | 16 #include "chrome/common/message_box_flags.h" |
17 #include "chrome/views/controls/message_box_view.h" | 17 #include "chrome/views/controls/message_box_view.h" |
18 #include "chrome/views/window/window.h" | 18 #include "chrome/views/window/window.h" |
19 #include "grit/chromium_strings.h" | 19 #include "grit/chromium_strings.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 const int kMessageWidth = 400; | 24 const int kMessageWidth = 400; |
25 | 25 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 std::wstring parameters = url_spec.substr(split_offset + 1, | 136 std::wstring parameters = url_spec.substr(split_offset + 1, |
137 url_spec.length() - 1); | 137 url_spec.length() - 1); |
138 std::wstring application_to_launch; | 138 std::wstring application_to_launch; |
139 if (cmd_key.ReadValue(NULL, &application_to_launch)) { | 139 if (cmd_key.ReadValue(NULL, &application_to_launch)) { |
140 ReplaceSubstringsAfterOffset(&application_to_launch, 0, L"%1", parameters); | 140 ReplaceSubstringsAfterOffset(&application_to_launch, 0, L"%1", parameters); |
141 return application_to_launch; | 141 return application_to_launch; |
142 } else { | 142 } else { |
143 return std::wstring(); | 143 return std::wstring(); |
144 } | 144 } |
145 } | 145 } |
OLD | NEW |