OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" | 8 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/profiles/profile_manager.h" | 10 #include "chrome/browser/profiles/profile_manager.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 return target_tab->GetURL(); | 31 return target_tab->GetURL(); |
32 } | 32 } |
33 | 33 |
34 return GURL(); | 34 return GURL(); |
35 } | 35 } |
36 | 36 |
37 } // namespace | 37 } // namespace |
38 | 38 |
39 namespace chrome { | 39 namespace chrome { |
40 | 40 |
41 extern const char kAppLauncherCategoryTag[] = "AppLauncher"; | |
42 | |
43 void ShowFeedbackPage(Browser* browser, | 41 void ShowFeedbackPage(Browser* browser, |
44 const std::string& description_template, | 42 const std::string& description_template, |
45 const std::string& category_tag) { | 43 const std::string& category_tag) { |
46 GURL page_url; | 44 GURL page_url; |
47 if (browser) { | 45 if (browser) { |
48 page_url = GetTargetTabUrl(browser->session_id().id(), | 46 page_url = GetTargetTabUrl(browser->session_id().id(), |
49 browser->tab_strip_model()->active_index()); | 47 browser->tab_strip_model()->active_index()); |
50 } | 48 } |
51 | 49 |
52 Profile* profile = NULL; | 50 Profile* profile = NULL; |
(...skipping 27 matching lines...) Expand all Loading... |
80 | 78 |
81 extensions::FeedbackPrivateAPI* api = | 79 extensions::FeedbackPrivateAPI* api = |
82 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(profile); | 80 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(profile); |
83 | 81 |
84 api->RequestFeedback(description_template, | 82 api->RequestFeedback(description_template, |
85 category_tag, | 83 category_tag, |
86 page_url); | 84 page_url); |
87 } | 85 } |
88 | 86 |
89 } // namespace chrome | 87 } // namespace chrome |
OLD | NEW |