recorder: Change AI feedback product ID to be CrOS
Bug: b:344789836 Test: compile Change-Id: Ibff5809a7e642e7ff9762e29dc48e242eb20b445 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5796152 Reviewed-by: Xiangdong Kong <xiangdongkong@google.com> Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org> Reviewed-by: Shik Chen <shik@chromium.org> Cr-Commit-Position: refs/heads/main@{#1345302}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
c9af24420c
commit
1ddbe0194f
chrome/browser/ash/system_web_apps/apps/recorder_app
components/feedback
extensions/browser/api/feedback_private
@ -30,6 +30,7 @@ static_library("recorder_app") {
|
||||
"//chrome/browser/profiles:profile",
|
||||
"//chrome/browser/web_applications/mojom:mojom_web_apps_enum",
|
||||
"//chromeos/strings",
|
||||
"//components/feedback",
|
||||
"//components/soda",
|
||||
"//components/soda:utils",
|
||||
"//url",
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "chrome/browser/media/webrtc/media_device_salt_service_factory.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
#include "components/feedback/feedback_constants.h"
|
||||
#include "components/soda/soda_installer.h"
|
||||
#include "components/soda/soda_util.h"
|
||||
#include "url/gurl.h"
|
||||
@ -38,13 +39,17 @@ void ChromeRecorderAppUIDelegate::InstallSoda(
|
||||
void ChromeRecorderAppUIDelegate::OpenAiFeedbackDialog(
|
||||
const std::string& description_template) {
|
||||
Profile* profile = Profile::FromWebUI(web_ui_);
|
||||
base::Value::Dict ai_metadata;
|
||||
ai_metadata.Set(feedback::kConchMetadataKey, "true");
|
||||
chrome::ShowFeedbackPage(/*page_url=*/GURL(ash::kChromeUIRecorderAppURL),
|
||||
/*profile=*/profile,
|
||||
/*source=*/feedback::kFeedbackSourceAI,
|
||||
/*description_template=*/description_template,
|
||||
/*description_placeholder_text=*/std::string(),
|
||||
/*category_tag=*/"chromeos-recorder-app",
|
||||
/*extra_diagnostics=*/std::string());
|
||||
/*extra_diagnostics=*/std::string(),
|
||||
/*autofill_metadata=*/base::Value::Dict(),
|
||||
/*ai_metadata=*/std::move(ai_metadata));
|
||||
}
|
||||
|
||||
media_device_salt::MediaDeviceSaltService*
|
||||
|
@ -11,6 +11,7 @@ namespace feedback {
|
||||
|
||||
inline constexpr std::string_view kMahiMetadataKey = "from_mahi";
|
||||
inline constexpr std::string_view kSeaPenMetadataKey = "from_sea_pen";
|
||||
inline constexpr std::string_view kConchMetadataKey = "from_conch";
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
inline constexpr int kChromeOSProductId = 208;
|
||||
|
@ -70,8 +70,9 @@ constexpr int kChromeLabsAndKaleidoscopeProductId = 5192933;
|
||||
std::string StripFakepath(const std::string& path) {
|
||||
constexpr char kFakePathStr[] = "C:\\fakepath\\";
|
||||
if (base::StartsWith(path, kFakePathStr,
|
||||
base::CompareCase::INSENSITIVE_ASCII))
|
||||
base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return path.substr(std::size(kFakePathStr) - 1);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
@ -127,16 +128,21 @@ void SendFeedback(content::BrowserContext* browser_context,
|
||||
// Populate feedback data.
|
||||
feedback_data->set_description(feedback_info.description);
|
||||
|
||||
if (feedback_info.product_id)
|
||||
if (feedback_info.product_id) {
|
||||
feedback_data->set_product_id(*feedback_info.product_id);
|
||||
if (feedback_info.category_tag)
|
||||
}
|
||||
if (feedback_info.category_tag) {
|
||||
feedback_data->set_category_tag(*feedback_info.category_tag);
|
||||
if (feedback_info.page_url)
|
||||
}
|
||||
if (feedback_info.page_url) {
|
||||
feedback_data->set_page_url(*feedback_info.page_url);
|
||||
if (feedback_info.email)
|
||||
}
|
||||
if (feedback_info.email) {
|
||||
feedback_data->set_user_email(*feedback_info.email);
|
||||
if (feedback_info.trace_id)
|
||||
}
|
||||
if (feedback_info.trace_id) {
|
||||
feedback_data->set_trace_id(*feedback_info.trace_id);
|
||||
}
|
||||
if (feedback_params.send_autofill_metadata &&
|
||||
feedback_info.autofill_metadata) {
|
||||
feedback_data->set_autofill_metadata(*feedback_info.autofill_metadata);
|
||||
@ -284,8 +290,11 @@ std::unique_ptr<FeedbackInfo> FeedbackPrivateAPI::CreateFeedbackInfo(
|
||||
// default.
|
||||
info->product_id = FeedbackCommon::GetChromeBrowserProductId();
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// Use ChromeOS product id for ChromeOS AI wallpaper and VC backgrounds.
|
||||
if (ai_metadata.contains(feedback::kSeaPenMetadataKey)) {
|
||||
// Use ChromeOS product id for ChromeOS AI wallpaper and VC backgrounds.
|
||||
info->product_id = FeedbackCommon::GetChromeOSProductId();
|
||||
} else if (ai_metadata.contains(feedback::kConchMetadataKey)) {
|
||||
// Use ChromeOS product id for ChromeOS Recorder App.
|
||||
info->product_id = FeedbackCommon::GetChromeOSProductId();
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
Reference in New Issue
Block a user