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

Unified Diff: chrome/renderer/extensions/id_generator_custom_bindings.cc

Issue 235943018: Move extensions bindings code out of //chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 8 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: chrome/renderer/extensions/id_generator_custom_bindings.cc
diff --git a/chrome/renderer/extensions/id_generator_custom_bindings.cc b/chrome/renderer/extensions/id_generator_custom_bindings.cc
deleted file mode 100644
index 42c7d83e715636a7c64bd13b5c41eddf21bcb95d..0000000000000000000000000000000000000000
--- a/chrome/renderer/extensions/id_generator_custom_bindings.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/renderer/extensions/id_generator_custom_bindings.h"
-
-#include "base/bind.h"
-#include "grit/renderer_resources.h"
-#include "v8/include/v8.h"
-
-namespace extensions {
-
-IdGeneratorCustomBindings::IdGeneratorCustomBindings(Dispatcher* dispatcher,
- ChromeV8Context* context)
- : ChromeV8Extension(dispatcher, context) {
- RouteFunction("GetNextId", base::Bind(&IdGeneratorCustomBindings::GetNextId,
- base::Unretained(this)));
-}
-
-void IdGeneratorCustomBindings::GetNextId(
- const v8::FunctionCallbackInfo<v8::Value>& args) {
- static int32_t next_id = 0;
- ++next_id;
- // Make sure 0 is never returned because some APIs (particularly WebRequest)
- // have special meaning for 0 IDs.
- if (next_id == 0)
- next_id = 1;
- args.GetReturnValue().Set(next_id);
-}
-
-} // namespace extensions
« no previous file with comments | « chrome/renderer/extensions/id_generator_custom_bindings.h ('k') | chrome/renderer/extensions/logging_native_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698