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

Side by Side Diff: extensions/renderer/safe_builtins.cc

Issue 622343002: replace OVERRIDE and FINAL with override and final in extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « extensions/renderer/resource_bundle_source_map.h ('k') | extensions/renderer/script_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/safe_builtins.h" 5 #include "extensions/renderer/safe_builtins.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "extensions/renderer/script_context.h" 10 #include "extensions/renderer/script_context.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return value->ToObject(); 141 return value->ToObject();
142 } 142 }
143 143
144 class ExtensionImpl : public v8::Extension { 144 class ExtensionImpl : public v8::Extension {
145 public: 145 public:
146 ExtensionImpl() : v8::Extension(kClassName, kScript) {} 146 ExtensionImpl() : v8::Extension(kClassName, kScript) {}
147 147
148 private: 148 private:
149 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( 149 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate(
150 v8::Isolate* isolate, 150 v8::Isolate* isolate,
151 v8::Handle<v8::String> name) OVERRIDE { 151 v8::Handle<v8::String> name) override {
152 if (name->Equals(v8::String::NewFromUtf8(isolate, "Apply"))) 152 if (name->Equals(v8::String::NewFromUtf8(isolate, "Apply")))
153 return v8::FunctionTemplate::New(isolate, Apply); 153 return v8::FunctionTemplate::New(isolate, Apply);
154 if (name->Equals(v8::String::NewFromUtf8(isolate, "Save"))) 154 if (name->Equals(v8::String::NewFromUtf8(isolate, "Save")))
155 return v8::FunctionTemplate::New(isolate, Save); 155 return v8::FunctionTemplate::New(isolate, Save);
156 NOTREACHED() << *v8::String::Utf8Value(name); 156 NOTREACHED() << *v8::String::Utf8Value(name);
157 return v8::Handle<v8::FunctionTemplate>(); 157 return v8::Handle<v8::FunctionTemplate>();
158 } 158 }
159 159
160 static void Apply(const v8::FunctionCallbackInfo<v8::Value>& info) { 160 static void Apply(const v8::FunctionCallbackInfo<v8::Value>& info) {
161 CHECK(info.Length() == 5 && info[0]->IsFunction() && // function 161 CHECK(info.Length() == 5 && info[0]->IsFunction() && // function
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 v8::Local<v8::Object> SafeBuiltins::GetString() const { 232 v8::Local<v8::Object> SafeBuiltins::GetString() const {
233 return Load("String", context_->v8_context()); 233 return Load("String", context_->v8_context());
234 } 234 }
235 235
236 v8::Local<v8::Object> SafeBuiltins::GetError() const { 236 v8::Local<v8::Object> SafeBuiltins::GetError() const {
237 return Load("Error", context_->v8_context()); 237 return Load("Error", context_->v8_context());
238 } 238 }
239 239
240 } // namespace extensions 240 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/resource_bundle_source_map.h ('k') | extensions/renderer/script_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698