Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 } | 59 } |
| 60 | 60 |
| 61 // We do not want to launch on an OTR profile. | 61 // We do not want to launch on an OTR profile. |
| 62 profile = profile->GetOriginalProfile(); | 62 profile = profile->GetOriginalProfile(); |
| 63 DCHECK(profile); | 63 DCHECK(profile); |
| 64 | 64 |
| 65 #if defined(OS_CHROMEOS) | 65 #if defined(OS_CHROMEOS) |
| 66 // Obtains the display profile ID on which the Feedback window should show. | 66 // Obtains the display profile ID on which the Feedback window should show. |
| 67 chrome::MultiUserWindowManager* const window_manager = | 67 chrome::MultiUserWindowManager* const window_manager = |
| 68 chrome::MultiUserWindowManager::GetInstance(); | 68 chrome::MultiUserWindowManager::GetInstance(); |
| 69 const std::string display_profile_id = | 69 const user_manager::UserID display_profile_id = |
| 70 window_manager && browser | 70 window_manager && browser |
| 71 ? window_manager->GetUserPresentingWindow( | 71 ? window_manager->GetUserPresentingWindow( |
| 72 browser->window()->GetNativeWindow()) | 72 browser->window()->GetNativeWindow()) |
| 73 : ""; | 73 : user_manager::UserID(std::string(), std::string()); |
|
Denis Kuznetsov (DE-MUC)
2015/06/10 16:50:44
EmptyUserID
| |
| 74 profile = display_profile_id.empty() | 74 profile = display_profile_id.empty() |
| 75 ? profile | 75 ? profile |
| 76 : multi_user_util::GetProfileFromUserID(display_profile_id); | 76 : multi_user_util::GetProfileFromUserID(display_profile_id); |
| 77 #endif | 77 #endif |
| 78 | 78 |
| 79 extensions::FeedbackPrivateAPI* api = | 79 extensions::FeedbackPrivateAPI* api = |
| 80 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(profile); | 80 extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(profile); |
| 81 | 81 |
| 82 api->RequestFeedback(description_template, | 82 api->RequestFeedback(description_template, |
| 83 category_tag, | 83 category_tag, |
| 84 page_url); | 84 page_url); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace chrome | 87 } // namespace chrome |
| OLD | NEW |