diff options
author | lazyboy <lazyboy@chromium.org> | 2015-09-10 12:28:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-10 19:29:24 +0000 |
commit | aebc54551218aa2a23bb18554f3c9b9eb793581a (patch) | |
tree | e0669a8d0d72dcec4416e8a896b911fdd08cda49 /extensions/browser/guest_view | |
parent | 6de04ca9333f46847f117828b2f9b2d6994304c2 (diff) | |
download | chromium_src-aebc54551218aa2a23bb18554f3c9b9eb793581a.zip chromium_src-aebc54551218aa2a23bb18554f3c9b9eb793581a.tar.gz chromium_src-aebc54551218aa2a23bb18554f3c9b9eb793581a.tar.bz2 |
Add missing histogram values for <webview>'s WebRequest API events.
This prevents hitting NOTREACHED() when calling .addListener on those
events.
BUG=528853
Test=Hangouts app should work in debug chromium. See bug for details.
Review URL: https://codereview.chromium.org/1315713010
Cr-Commit-Position: refs/heads/master@{#348211}
Diffstat (limited to 'extensions/browser/guest_view')
3 files changed, 25 insertions, 6 deletions
diff --git a/extensions/browser/guest_view/guest_view_events.cc b/extensions/browser/guest_view/guest_view_events.cc index 843083b..933134d 100644 --- a/extensions/browser/guest_view/guest_view_events.cc +++ b/extensions/browser/guest_view/guest_view_events.cc @@ -73,6 +73,13 @@ class EventMap { {webview::kEventUnresponsive, events::WEB_VIEW_INTERNAL_ON_UNRESPONSIVE}, {webview::kEventZoomChange, events::WEB_VIEW_INTERNAL_ON_ZOOM_CHANGE}, + {webview::kEventAuthRequired, + events::WEB_VIEW_INTERNAL_ON_AUTH_REQUIRED}, + {webview::kEventBeforeRedirect, + events::WEB_VIEW_INTERNAL_ON_BEFORE_REDIRECT}, + {webview::kEventErrorOccurred, + events::WEB_VIEW_INTERNAL_ON_ERROR_OCCURRED}, + {webview::kEventSendHeaders, events::WEB_VIEW_INTERNAL_ON_SEND_HEADERS}, }; for (const auto& name_and_value : names_and_values) { values_[name_and_value.name] = name_and_value.value; diff --git a/extensions/browser/guest_view/web_view/web_view_constants.cc b/extensions/browser/guest_view/web_view/web_view_constants.cc index 52834fa..fff62e8 100644 --- a/extensions/browser/guest_view/web_view/web_view_constants.cc +++ b/extensions/browser/guest_view/web_view/web_view_constants.cc @@ -21,10 +21,7 @@ const char kAPILoadDataInvalidBaseURL[] = "Invalid base URL \"%s\"."; const char kAPILoadDataInvalidVirtualURL[] = "Invalid virtual URL \"%s\"."; // Events. -const char kEventBeforeRequest[] = "webViewInternal.onBeforeRequest"; -const char kEventBeforeSendHeaders[] = "webViewInternal.onBeforeSendHeaders"; const char kEventClose[] = "webViewInternal.onClose"; -const char kEventCompleted[] = "webViewInternal.onCompleted"; const char kEventConsoleMessage[] = "webViewInternal.onConsoleMessage"; const char kEventContentLoad[] = "webViewInternal.onContentLoad"; const char kEventContextMenuShow[] = "chromeWebViewInternal.onContextMenuShow"; @@ -50,6 +47,15 @@ const char kEventSizeChanged[] = "webViewInternal.onSizeChanged"; const char kEventUnresponsive[] = "webViewInternal.onUnresponsive"; const char kEventZoomChange[] = "webViewInternal.onZoomChange"; +// WebRequest API events. +const char kEventAuthRequired[] = "webViewInternal.onAuthRequired"; +const char kEventBeforeRedirect[] = "webViewInternal.onBeforeRedirect"; +const char kEventBeforeRequest[] = "webViewInternal.onBeforeRequest"; +const char kEventBeforeSendHeaders[] = "webViewInternal.onBeforeSendHeaders"; +const char kEventCompleted[] = "webViewInternal.onCompleted"; +const char kEventErrorOccurred[] = "webViewInternal.onErrorOccurred"; +const char kEventSendHeaders[] = "webViewInternal.onSendHeaders"; + // Event related constants. const char kWebViewEventPrefix[] = "webViewInternal."; diff --git a/extensions/browser/guest_view/web_view/web_view_constants.h b/extensions/browser/guest_view/web_view/web_view_constants.h index 7bc877b..17b1517 100644 --- a/extensions/browser/guest_view/web_view/web_view_constants.h +++ b/extensions/browser/guest_view/web_view/web_view_constants.h @@ -27,10 +27,7 @@ extern const char kAPILoadDataInvalidBaseURL[]; extern const char kAPILoadDataInvalidVirtualURL[]; // Events. -extern const char kEventBeforeRequest[]; -extern const char kEventBeforeSendHeaders[]; extern const char kEventClose[]; -extern const char kEventCompleted[]; extern const char kEventConsoleMessage[]; extern const char kEventContentLoad[]; extern const char kEventContextMenuShow[]; @@ -56,6 +53,15 @@ extern const char kEventSizeChanged[]; extern const char kEventUnresponsive[]; extern const char kEventZoomChange[]; +// WebRequest API events. +extern const char kEventAuthRequired[]; +extern const char kEventBeforeRedirect[]; +extern const char kEventBeforeRequest[]; +extern const char kEventBeforeSendHeaders[]; +extern const char kEventCompleted[]; +extern const char kEventErrorOccurred[]; +extern const char kEventSendHeaders[]; + // Event related constants. extern const char kWebViewEventPrefix[]; |