-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use brave url in about page #326
Conversation
@@ -229,7 +229,7 @@ const char kSyncLearnMoreURL[] = | |||
"https://community.brave.com"; | |||
|
|||
const char kUpgradeHelpCenterBaseURL[] = | |||
"https://community.brave.com"; | |||
"https://community.brave.com/?p=update_error&error="; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kUpgradeHelpCenterBaseURL
is used by UpdateCheckDriver::OnUpgradeError()
base::string16 html_error_msg =
base::StringPrintf(L"%d: <a href='%ls0x%X' target=_blank>0x%X</a>",
error_code_, base::UTF8ToUTF16(
chrome::kUpgradeHelpCenterBaseURL).c_str(),
hresult_, hresult_);
W/o this url change, broken link address is created like https://community.brave.com0x238924
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't these point to something more useful? They all just go to the community home page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's a separate issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridiver @Brave-Matt is working on building out support pages for these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the comment at the top of this file.
* For rebasing Chromium, see this PR for vim commands:
* https://github.com/brave/brave-core/pull/155
* IMPORTANMT: SCAN MANUALLY TO MAKE SURE NOTHING ELSE NEW IS MISSING!
Each chromium rebase we copy the chrome file to this file.
Then we execute the vim commands.
So with this it would only live 1 chromium rebase only.
I think we need to either change the vim command or find another workaround.
Or if we have no better way then add info to the comment above the file too.
</div> | ||
<a hidden$="[[!shouldShowLearnMoreLink_( | ||
currentUpdateStatusEvent_)]]" target="_blank" | ||
- href="https://support.google.com/chrome?p=update_error"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbondy maybe we can handle these in the network delegate by looking at the referrer page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'll try network delegate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridiver I tested with network delegate and it works well.
With this approach, we don't need to make additional patch file.
However, I think there are some drawbacks with this this approach. WDYT?
- Status bubble shows google's url instead of our url.
- Difficult to catch upstream url change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, it actually displays the url? Maybe just stick with the patch for now then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, when mouse hovers over the link, bubble shows google url.
@bbondy I think current vim command strategy would not be used when we have actual urls because each will use different url. Added some comments to |
baa4777
to
1574f35
Compare
I'm just not confident we'll have those URLs for quite a while. I hope I'm pleasantly surprised though. |
Hmm, I think removing link for specific error number and only shows only learn more link is sufficient for us. |
sgtm @simonhong |
1574f35
to
a3728d7
Compare
@bbondy I think this is ready to review. As you can see the captured image, only learn more link is used. |
+#else | ||
base::StringPrintf(L"%d: <a href='%ls0x%X' target=_blank>0x%X</a>", | ||
error_code_, base::UTF8ToUTF16( | ||
chrome::kUpgradeHelpCenterBaseURL).c_str(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't we just change kUpgradeHelpCenterBaseURL to `"https://community.brave.com/?error=";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the original change had something like that, but now I can't see it anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. chrome::kUpgradeHelpCenterBaseURL
in url_constants.cc
was modified like that.
However, that change breaks this file's rebase strategy(#155)
Also, we don't have a plan for providing specific links for specific error code for now.
So, link for specific error code was removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you mean about the rebase strategy. I would rather pass an error code that we don't use yet than patch to remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Please check again!
And hide error specific link
a3728d7
to
294a19d
Compare
@@ -7,6 +7,8 @@ | |||
/** | |||
* For rebasing Chromium, see this PR for vim commands: | |||
* https://github.com/brave/brave-core/pull/155 | |||
* After rebasing with vim replacing command, please change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about this comment and the addition to it. If anything is added to url_constants.cc in upstream we'll have missing symbols in the build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just an easy way to rebase the file when doing major chromium upgrades.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but why do we need to do that? Any missing constants will cause build errors and eventually these won't all be the same url anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think above comments just says about the tips to change this file's contents. (replacing strings with vim command...)
After that, we can know missing things if it exists by build errors.
…-409 Adds already claimed status for the grant
Hide error specific link and use brave url for learn more link.
Close brave/brave-browser#451
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist: