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/chromeos/login/help_app_launcher.h" | 5 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 namespace chromeos { | 28 namespace chromeos { |
29 | 29 |
30 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
31 // HelpApp, public: | 31 // HelpApp, public: |
32 | 32 |
33 HelpAppLauncher::HelpAppLauncher(gfx::NativeWindow parent_window) | 33 HelpAppLauncher::HelpAppLauncher(gfx::NativeWindow parent_window) |
34 : parent_window_(parent_window) { | 34 : parent_window_(parent_window) { |
35 } | 35 } |
36 | 36 |
37 void HelpAppLauncher::ShowHelpTopic(HelpTopic help_topic_id) { | 37 void HelpAppLauncher::ShowHelpTopic(HelpTopic help_topic_id) { |
38 Profile* profile = ProfileManager::GetDefaultProfile(); | 38 Profile* profile = ProfileManager::GetSigninProfile(); |
39 ExtensionService* service = | 39 ExtensionService* service = |
40 extensions::ExtensionSystem::Get(profile)->extension_service(); | 40 extensions::ExtensionSystem::Get(profile)->extension_service(); |
41 | 41 |
42 DCHECK(service); | 42 DCHECK(service); |
43 if (!service) | 43 if (!service) |
44 return; | 44 return; |
45 | 45 |
46 GURL url(base::StringPrintf(kHelpAppFormat, | 46 GURL url(base::StringPrintf(kHelpAppFormat, |
47 static_cast<int>(help_topic_id))); | 47 static_cast<int>(help_topic_id))); |
48 // HelpApp component extension presents only in official builds so we can | 48 // HelpApp component extension presents only in official builds so we can |
(...skipping 16 matching lines...) Expand all Loading... |
65 NULL, | 65 NULL, |
66 parent_window_, | 66 parent_window_, |
67 l10n_util::GetStringUTF16(IDS_LOGIN_OOBE_HELP_DIALOG_TITLE), | 67 l10n_util::GetStringUTF16(IDS_LOGIN_OOBE_HELP_DIALOG_TITLE), |
68 topic_url, | 68 topic_url, |
69 LoginWebDialog::STYLE_BUBBLE); | 69 LoginWebDialog::STYLE_BUBBLE); |
70 dialog->Show(); | 70 dialog->Show(); |
71 // The dialog object will be deleted on dialog close. | 71 // The dialog object will be deleted on dialog close. |
72 } | 72 } |
73 | 73 |
74 } // namespace chromeos | 74 } // namespace chromeos |
OLD | NEW |