Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Issue 19857005: Do not show translate bar for MHTML files. (Closed)

Created:
7 years, 5 months ago by Dominik Grewe
Modified:
7 years, 4 months ago
Reviewers:
Miguel Garcia, MAD, brettw
CC:
chromium-reviews, Miguel Garcia
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Do not show translate bar for MHTML files. Add a check for MHTML files to TranslateManager::IsTranslatableURL(). This causes the translate infobar to not be shown for MHTML files, because Chrome fails when trying to translate MHTML files. BUG=217945 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=215878

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add and use GURL::ExtractFileExtension() #

Total comments: 1

Patch Set 3 : Case insensitive comparison for file extension. #

Patch Set 4 : Use MIME type to block translation of MHTML pages #

Total comments: 2

Patch Set 5 : Clean up comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -11 lines) Patch
M chrome/browser/translate/translate_browser_metrics.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/translate/translate_browser_metrics_unittest.cc View 1 2 3 3 chunks +17 lines, -11 lines 0 comments Download
M chrome/browser/translate/translate_manager.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Dominik Grewe
Please take a look at this CL. Can you please also do a try (I ...
7 years, 5 months ago (2013-07-22 17:36:04 UTC) #1
Miguel Garcia
Pass by reviews. You should be able to run try bots directly from the web ...
7 years, 5 months ago (2013-07-22 17:42:00 UTC) #2
Dominik Grewe
On 2013/07/22 17:42:00, Miguel Garcia wrote: > Pass by reviews. You should be able to ...
7 years, 5 months ago (2013-07-22 17:59:05 UTC) #3
Dominik Grewe
Brett, can you please take a look at my implementation of GURL::ExtractFileExtension().
7 years, 5 months ago (2013-07-23 11:20:27 UTC) #4
MAD
One question... BYE MAD https://chromiumcodereview.appspot.com/19857005/diff/18001/chrome/browser/translate/translate_manager.cc File chrome/browser/translate/translate_manager.cc (right): https://chromiumcodereview.appspot.com/19857005/diff/18001/chrome/browser/translate/translate_manager.cc#newcode122 chrome/browser/translate/translate_manager.cc:122: !(file_extension.compare(kFileExtMHTMLShort) == 0 || Shouldn't ...
7 years, 4 months ago (2013-07-29 20:39:17 UTC) #5
Dominik Grewe
On 2013/07/29 20:39:17, MAD wrote: > chrome/browser/translate/translate_manager.cc:122: > !(file_extension.compare(kFileExtMHTMLShort) == 0 || > Shouldn't we ...
7 years, 4 months ago (2013-07-30 09:33:16 UTC) #6
MAD
Thanks! translate/ LGTM BYE MAD...
7 years, 4 months ago (2013-07-30 13:29:19 UTC) #7
brettw
I'm not sure this is the right solution. Generally on the web the extension is ...
7 years, 4 months ago (2013-08-01 22:50:49 UTC) #8
Dominik Grewe
On 2013/08/01 22:50:49, brettw wrote: > I'm not sure this is the right solution. > ...
7 years, 4 months ago (2013-08-02 09:46:22 UTC) #9
Dominik Grewe
I think I found a much cleaner solution following brettw's suggestion. What I didn't realize ...
7 years, 4 months ago (2013-08-05 11:39:01 UTC) #10
MAD
I didn't know about it either, and I agree it's much cleaner like this... Thanks! ...
7 years, 4 months ago (2013-08-05 15:02:27 UTC) #11
brettw
Sweet, thanks for looking for that.
7 years, 4 months ago (2013-08-05 23:10:55 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominikg@chromium.org/19857005/44001
7 years, 4 months ago (2013-08-06 08:51:20 UTC) #13
commit-bot: I haz the power
7 years, 4 months ago (2013-08-06 12:42:51 UTC) #14
Message was sent while issue was closed.
Change committed as 215878

Powered by Google App Engine
This is Rietveld 408576698