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

Side by Side Diff: chrome/renderer/extensions/feedback_private_custom_bindings.cc

Issue 29513003: Cleanup deprecated and no longer needed blob revamp stuff, deadcode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/fileapi/fileapi_message_filter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/renderer/extensions/feedback_private_custom_bindings.h" 5 #include "chrome/renderer/extensions/feedback_private_custom_bindings.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "third_party/WebKit/public/platform/WebCString.h" 8 #include "third_party/WebKit/public/platform/WebCString.h"
9 #include "third_party/WebKit/public/platform/WebURL.h" 9 #include "third_party/WebKit/public/platform/WebURL.h"
10 #include "third_party/WebKit/public/web/WebBlob.h" 10 #include "third_party/WebKit/public/web/WebBlob.h"
11 11
12 namespace { 12 namespace {
13 13
14 void GetBlobUuid(const v8::FunctionCallbackInfo<v8::Value> &args) { 14 void GetBlobUuid(const v8::FunctionCallbackInfo<v8::Value> &args) {
15 DCHECK(args.Length() == 1); 15 DCHECK(args.Length() == 1);
16 WebKit::WebBlob blob = WebKit::WebBlob::fromV8Value(args[0]); 16 WebKit::WebBlob blob = WebKit::WebBlob::fromV8Value(args[0]);
17 #ifdef USE_BLOB_UUIDS
18 args.GetReturnValue().Set(v8::String::New(blob.uuid().utf8().data())); 17 args.GetReturnValue().Set(v8::String::New(blob.uuid().utf8().data()));
19 #else
20 args.GetReturnValue().Set(v8::String::New(blob.url().spec().data()));
21 #endif
22 } 18 }
23 19
24 } // namespace 20 } // namespace
25 21
26 namespace extensions { 22 namespace extensions {
27 23
28 FeedbackPrivateCustomBindings::FeedbackPrivateCustomBindings( 24 FeedbackPrivateCustomBindings::FeedbackPrivateCustomBindings(
29 Dispatcher* dispatcher, 25 Dispatcher* dispatcher,
30 ChromeV8Context* context) : ChromeV8Extension(dispatcher, context) { 26 ChromeV8Context* context) : ChromeV8Extension(dispatcher, context) {
31 RouteFunction("GetBlobUuid", base::Bind(&GetBlobUuid)); 27 RouteFunction("GetBlobUuid", base::Bind(&GetBlobUuid));
32 } 28 }
33 29
34 } // namespace extensions 30 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | content/browser/fileapi/fileapi_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698