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

Issue 10407105: Improve error messaging of webRequest API in case of conflicts (Closed)

Created:
8 years, 7 months ago by battre
Modified:
8 years, 1 month ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Improve error messaging of webRequest API in case of conflicts BUG=126438 TBR=jochen@chromium.org,estade@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167673

Patch Set 1 #

Patch Set 2 : Merged with ToT #

Patch Set 3 : Cleanup, made thread-safe #

Patch Set 4 : Improve error messages #

Patch Set 5 : Merged with ToT #

Total comments: 22

Patch Set 6 : Addressed comments #

Patch Set 7 : Addressed comments, fixed NULL ptr access #

Patch Set 8 : Store ExtensionWarnings as values in set rather than pointers #

Total comments: 12

Patch Set 9 : Addressed Aaron's comments #

Patch Set 10 : Nits #

Patch Set 11 : Merged with ToT #

Patch Set 12 : Uploaded wrong branch #

Patch Set 13 : Fixed NULL pointer dereference #

Patch Set 14 : Merged with ToT #

Total comments: 1

Patch Set 15 : Merged with ToT #

Patch Set 16 : Fixed nits #

Patch Set 17 : Fixed unit test compilation #

Patch Set 18 : Refactored #

Patch Set 19 : Added missing files #

Patch Set 20 : Attempt to fix windows compilation #

Patch Set 21 : Attempt to fix windows compilation #

Total comments: 4

Patch Set 22 : Merged with ToT #

Patch Set 23 : Addressed comments #

Patch Set 24 : Rename GetMessage function as it is #defined to GetMessageW on Windows #

Total comments: 6

Patch Set 25 : Addressed Evan's comments #

Patch Set 26 : Addressed Evan's comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1240 lines, -652 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 8 chunks +19 lines, -17 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_helpers.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_helpers.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 18 chunks +111 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 46 chunks +109 lines, -94 lines 0 comments Download
D chrome/browser/extensions/extension_global_error_badge.h View 1 2 3 4 5 6 7 8 11 15 16 17 1 chunk +0 lines, -45 lines 0 comments Download
M chrome/browser/extensions/extension_global_error_badge.cc View 1 2 3 4 5 6 7 8 11 15 16 17 1 chunk +0 lines, -83 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +0 lines, -13 lines 0 comments Download
M chrome/browser/extensions/extension_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +16 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_warning_badge_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_warning_badge_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +177 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_warning_badge_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +98 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_warning_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +92 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_warning_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +145 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_warning_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +117 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_warning_set.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +71 lines, -57 lines 0 comments Download
M chrome/browser/extensions/extension_warning_set.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +158 lines, -146 lines 0 comments Download
M chrome/browser/extensions/extension_warning_set_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -136 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_system.cc View 1 2 3 4 5 9 10 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 5 chunks +13 lines, -4 lines 1 comment Download
M chrome/browser/ui/webui/extensions/extension_settings_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 12 chunks +24 lines, -21 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/chrome_notification_types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
battre
Hi Matt, could you review this please? Thanks, Dominic
8 years, 7 months ago (2012-05-22 20:09:50 UTC) #1
Matt Perry
You should run this by someone from the UI team. I seem to remember we ...
8 years, 7 months ago (2012-05-22 20:46:56 UTC) #2
battre
+glen as suggested by Matt I would like to give better error messaging because a) ...
8 years, 7 months ago (2012-05-22 21:14:28 UTC) #3
Glen Murphy
Can you provide screenshots of the implementation? On Tue, May 22, 2012 at 2:14 PM, ...
8 years, 7 months ago (2012-05-23 22:59:52 UTC) #4
battre
Sure. http://www/~battre/screenshot-warnings.png There is no change in the way warnings are displayed. The only change ...
8 years, 7 months ago (2012-05-24 17:52:31 UTC) #5
Aaron Boodman
Can we put the title in the parenthesis instead of the extension ID? On Thu, ...
8 years, 7 months ago (2012-05-24 20:17:37 UTC) #6
battre
Yes, I see five options (none is pretty) - Store the extension ID first and ...
8 years, 7 months ago (2012-05-24 20:44:23 UTC) #7
battre
I have revived this old CL. I had to change quite a lot. Please take ...
8 years, 3 months ago (2012-09-04 14:58:57 UTC) #8
battre
Oh, I have added Aaron as a reviewer. I would like to use this as ...
8 years, 3 months ago (2012-09-04 15:05:53 UTC) #9
Aaron Boodman
http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/extension_service.h#newcode623 chrome/browser/extensions/extension_service.h:623: ExtensionWarningService* extension_warnings() { Should be a member of ExtensionSystem, ...
8 years, 3 months ago (2012-09-05 08:11:11 UTC) #10
Matt Perry
lgtm http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc File chrome/browser/extensions/api/web_request/web_request_api_helpers.cc (right): http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/api/web_request/web_request_api_helpers.cc#newcode576 chrome/browser/extensions/api/web_request/web_request_api_helpers.cc:576: static std::string FindSetRequestHeader( move helpers to the top ...
8 years, 3 months ago (2012-09-06 00:21:37 UTC) #11
battre
Hi Aaron, please take another look. I have addressed several of your issues but I ...
8 years, 3 months ago (2012-09-06 14:25:48 UTC) #12
Aaron Boodman
http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/extension_warning_set.h File chrome/browser/extensions/extension_warning_set.h (right): http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/extension_warning_set.h#newcode23 chrome/browser/extensions/extension_warning_set.h:23: class ExtensionWarning { On 2012/09/06 14:25:48, battre wrote: > ...
8 years, 3 months ago (2012-09-06 15:33:31 UTC) #13
battre
http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/extension_warning_set.h File chrome/browser/extensions/extension_warning_set.h (right): http://codereview.chromium.org/10407105/diff/16002/chrome/browser/extensions/extension_warning_set.h#newcode76 chrome/browser/extensions/extension_warning_set.h:76: const std::string GetMessage(ExtensionService* extension_service) const; On 2012/09/06 15:33:31, Aaron ...
8 years, 3 months ago (2012-09-10 17:21:37 UTC) #14
battre
Aaron, I forgot to submit a useful message last time (I was in a hurry). ...
8 years, 3 months ago (2012-09-11 21:56:41 UTC) #15
Aaron Boodman
http://codereview.chromium.org/10407105/diff/18004/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): http://codereview.chromium.org/10407105/diff/18004/chrome/browser/extensions/extension_service.cc#newcode818 chrome/browser/extensions/extension_service.cc:818: &warning_types); Why not put this in UNLOAD rather than ...
8 years, 3 months ago (2012-09-18 18:48:56 UTC) #16
Aaron Boodman
http://codereview.chromium.org/10407105/diff/18004/chrome/browser/extensions/extension_warning_set.h File chrome/browser/extensions/extension_warning_set.h (right): http://codereview.chromium.org/10407105/diff/18004/chrome/browser/extensions/extension_warning_set.h#newcode5 chrome/browser/extensions/extension_warning_set.h:5: #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_SET_H_ On 2012/09/18 18:48:56, Aaron Boodman wrote: > ...
8 years, 3 months ago (2012-09-18 18:50:06 UTC) #17
battre
Hi Aaron, Please take another look. Thanks, Dominic http://codereview.chromium.org/10407105/diff/18004/chrome/browser/extensions/extension_service.cc File chrome/browser/extensions/extension_service.cc (right): http://codereview.chromium.org/10407105/diff/18004/chrome/browser/extensions/extension_service.cc#newcode814 chrome/browser/extensions/extension_service.cc:814: std::set<ExtensionWarning::WarningType> ...
8 years, 3 months ago (2012-09-20 14:23:07 UTC) #18
battre
Aaron, I have fixed a SEGFAULT and addressed your comments. Could you please have another ...
8 years, 2 months ago (2012-09-28 15:34:20 UTC) #19
battre
Aaron: Another ping, as you declared email bankruptcy. Best regards, Dominic On 2012/09/28 15:34:20, battre ...
8 years, 2 months ago (2012-10-15 20:42:53 UTC) #20
Aaron Boodman
http://codereview.chromium.org/10407105/diff/37004/chrome/browser/extensions/extension_warning_set.cc File chrome/browser/extensions/extension_warning_set.cc (right): http://codereview.chromium.org/10407105/diff/37004/chrome/browser/extensions/extension_warning_set.cc#newcode220 chrome/browser/extensions/extension_warning_set.cc:220: registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, Sigh, this isn't what I had in ...
8 years, 2 months ago (2012-10-16 06:06:05 UTC) #21
battre
Hi Aaron, I am terribly sorry. I pinged you for a messy CL. I had ...
8 years, 2 months ago (2012-10-19 13:56:51 UTC) #22
battre
@Aaron: Friendly ping, trying to revive this. Please review this CL. Thanks, Dominic
8 years, 1 month ago (2012-11-05 17:15:08 UTC) #23
Aaron Boodman
lgtm w/ nits - sorry for laggy review http://codereview.chromium.org/10407105/diff/65006/chrome/browser/extensions/extension_warning_service.h File chrome/browser/extensions/extension_warning_service.h (right): http://codereview.chromium.org/10407105/diff/65006/chrome/browser/extensions/extension_warning_service.h#newcode55 chrome/browser/extensions/extension_warning_service.h:55: std::set<ExtensionWarning::WarningType>* ...
8 years, 1 month ago (2012-11-08 23:02:55 UTC) #24
battre
http://codereview.chromium.org/10407105/diff/65006/chrome/browser/extensions/extension_warning_service.h File chrome/browser/extensions/extension_warning_service.h (right): http://codereview.chromium.org/10407105/diff/65006/chrome/browser/extensions/extension_warning_service.h#newcode55 chrome/browser/extensions/extension_warning_service.h:55: std::set<ExtensionWarning::WarningType>* result) const; On 2012/11/08 23:02:55, Aaron Boodman wrote: ...
8 years, 1 month ago (2012-11-13 17:27:33 UTC) #25
battre
I will TBR jochen for OWNERs approval of chrome/*.gypi changes and code deletion in chrome/common/chrome_notification_types.h. ...
8 years, 1 month ago (2012-11-13 17:32:34 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/battre@chromium.org/10407105/78004
8 years, 1 month ago (2012-11-13 18:17:07 UTC) #27
jochen (gone - plz use gerrit)
gypi changes lgtm
8 years, 1 month ago (2012-11-13 18:23:46 UTC) #28
battre
Taking out of commit queue as Jochen feels that chrome/browser/ui/webui/extensions/ should have a full owners ...
8 years, 1 month ago (2012-11-13 18:31:52 UTC) #29
Evan Stade
webui lgtm http://codereview.chromium.org/10407105/diff/78004/chrome/browser/ui/webui/extensions/extension_settings_handler.cc File chrome/browser/ui/webui/extensions/extension_settings_handler.cc (right): http://codereview.chromium.org/10407105/diff/78004/chrome/browser/ui/webui/extensions/extension_settings_handler.cc#newcode94 chrome/browser/ui/webui/extensions/extension_settings_handler.cc:94: registrar_.RemoveAll(); I don't think this is necessary ...
8 years, 1 month ago (2012-11-13 20:21:54 UTC) #30
battre
Done. Jochen, could you please review the changes between patch set 24 and 26? Thanks, ...
8 years, 1 month ago (2012-11-14 12:30:53 UTC) #31
jochen (gone - plz use gerrit)
lgtm
8 years, 1 month ago (2012-11-14 12:42:55 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/battre@chromium.org/10407105/86005
8 years, 1 month ago (2012-11-14 12:57:37 UTC) #33
commit-bot: I haz the power
Change committed as 167673
8 years, 1 month ago (2012-11-14 14:44:13 UTC) #34
Evan Stade
8 years, 1 month ago (2012-11-14 21:50:15 UTC) #35
lgtm

http://codereview.chromium.org/10407105/diff/86005/chrome/browser/ui/webui/ex...
File chrome/browser/ui/webui/extensions/extension_settings_handler.h (right):

http://codereview.chromium.org/10407105/diff/86005/chrome/browser/ui/webui/ex...
chrome/browser/ui/webui/extensions/extension_settings_handler.h:244:
ScopedObserver<extensions::ExtensionWarningService,
I did not even know this existed. That is cool.

Powered by Google App Engine
This is Rietveld 408576698