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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 1636873005: blink: Fix naming and const-ness of constants and non-constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants: indents Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index e728623d5c978578683a6067ec101d77ecff7e96..757f7bcb444b948a146ccc3bd44c3631c111f955 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -849,12 +849,12 @@ DOMWindow* ChromeClientImpl::pagePopupWindowForTesting() const
bool ChromeClientImpl::shouldOpenModalDialogDuringPageDismissal(const DialogType& dialogType, const String& dialogMessage, Document::PageDismissalType dismissalType) const
{
- const char* kDialogs[] = {"alert", "confirm", "prompt"};
+ const char* const kDialogs[] = { "alert", "confirm", "prompt" };
int dialog = static_cast<int>(dialogType);
ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog);
ASSERT_WITH_SECURITY_IMPLICATION(dialog < static_cast<int>(WTF_ARRAY_LENGTH(kDialogs)));
- const char* kDismissals[] = {"beforeunload", "pagehide", "unload"};
+ const char* const kDismissals[] = { "beforeunload", "pagehide", "unload" };
int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal.
ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal);
ASSERT_WITH_SECURITY_IMPLICATION(dismissal < static_cast<int>(WTF_ARRAY_LENGTH(kDismissals)));

Powered by Google App Engine
This is Rietveld 408576698