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

Side by Side Diff: third_party/WebKit/Source/core/experiments/Experiments.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: . 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/experiments/Experiments.h" 5 #include "core/experiments/Experiments.h"
6 6
7 #include "core/dom/ElementTraversal.h" 7 #include "core/dom/ElementTraversal.h"
8 #include "core/dom/ExceptionCode.h" 8 #include "core/dom/ExceptionCode.h"
9 #include "core/html/HTMLHeadElement.h" 9 #include "core/html/HTMLHeadElement.h"
10 #include "core/html/HTMLMetaElement.h" 10 #include "core/html/HTMLMetaElement.h"
11 #include "platform/RuntimeEnabledFeatures.h" 11 #include "platform/RuntimeEnabledFeatures.h"
12 #include "platform/weborigin/SecurityOrigin.h" 12 #include "platform/weborigin/SecurityOrigin.h"
13 #include "public/platform/Platform.h" 13 #include "public/platform/Platform.h"
14 #include "public/platform/WebApiKeyValidator.h" 14 #include "public/platform/WebApiKeyValidator.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 namespace { 18 namespace {
19 19
20 const char* kExperimentsMetaName = "api-experiments"; 20 const char kExperimentsMetaName[] = "api-experiments";
Peter Kasting 2016/01/26 23:23:11 Bogus indenting? (And this is not the only file w
danakj 2016/01/26 23:36:18 Huh, ya clang-format doing it wrong here. I can ov
21 21
22 String getCurrentOrigin(ExecutionContext* executionContext) 22 String getCurrentOrigin(ExecutionContext* executionContext)
23 { 23 {
24 return executionContext->securityOrigin()->toString(); 24 return executionContext->securityOrigin()->toString();
25 } 25 }
26 26
27 String getDisabledMessage(const String& apiName) 27 String getDisabledMessage(const String& apiName)
28 { 28 {
29 // TODO(chasej): Update message with URL to experiments site, when live 29 // TODO(chasej): Update message with URL to experiments site, when live
30 return "The '" + apiName + "' API is currently enabled in limited experiment s. Please see [Chrome experiments website URL] for information on enabling this experiment on your site."; 30 return "The '" + apiName + "' API is currently enabled in limited experiment s. Please see [Chrome experiments website URL] for information on enabling this experiment on your site.";
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return hasValidAPIKey(executionContext, apiName, errorMessage, validator); 98 return hasValidAPIKey(executionContext, apiName, errorMessage, validator);
99 } 99 }
100 100
101 // static 101 // static
102 DOMException* Experiments::createApiDisabledException(const String& apiName) 102 DOMException* Experiments::createApiDisabledException(const String& apiName)
103 { 103 {
104 return DOMException::create(NotSupportedError, getDisabledMessage(apiName)); 104 return DOMException::create(NotSupportedError, getDisabledMessage(apiName));
105 } 105 }
106 106
107 } // namespace blink 107 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698