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

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

Issue 7697004: Cleanup: remove unnecessary ifdef, always use WebKit::WebFileSystem::Type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extension_process_bindings.h" 5 #include "chrome/renderer/extensions/extension_process_bindings.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 static v8::Handle<v8::Value> GetLocalFileSystem( 260 static v8::Handle<v8::Value> GetLocalFileSystem(
261 const v8::Arguments& args) { 261 const v8::Arguments& args) {
262 DCHECK(args.Length() == 2); 262 DCHECK(args.Length() == 2);
263 DCHECK(args[0]->IsString()); 263 DCHECK(args[0]->IsString());
264 DCHECK(args[1]->IsString()); 264 DCHECK(args[1]->IsString());
265 std::string name(*v8::String::Utf8Value(args[0])); 265 std::string name(*v8::String::Utf8Value(args[0]));
266 std::string path(*v8::String::Utf8Value(args[1])); 266 std::string path(*v8::String::Utf8Value(args[1]));
267 267
268 WebFrame* webframe = WebFrame::frameForCurrentContext(); 268 WebFrame* webframe = WebFrame::frameForCurrentContext();
269 #ifdef WEB_FILE_SYSTEM_TYPE_EXTERNAL
270 return webframe->createFileSystem(WebKit::WebFileSystem::TypeExternal, 269 return webframe->createFileSystem(WebKit::WebFileSystem::TypeExternal,
271 WebKit::WebString::fromUTF8(name.c_str()), 270 WebKit::WebString::fromUTF8(name.c_str()),
272 WebKit::WebString::fromUTF8(path.c_str())); 271 WebKit::WebString::fromUTF8(path.c_str()));
273 #else
274 return webframe->createFileSystem(fileapi::kFileSystemTypeExternal,
275 WebKit::WebString::fromUTF8(name.c_str()),
276 WebKit::WebString::fromUTF8(path.c_str()));
277 #endif
278 } 272 }
279 273
280 // Decodes supplied JPEG byte array to image pixel array. 274 // Decodes supplied JPEG byte array to image pixel array.
281 static v8::Handle<v8::Value> DecodeJPEG(const v8::Arguments& args) { 275 static v8::Handle<v8::Value> DecodeJPEG(const v8::Arguments& args) {
282 static const char* kAllowedIds[] = { 276 static const char* kAllowedIds[] = {
283 "haiffjcadagjlijoggckpgfnoeiflnem", 277 "haiffjcadagjlijoggckpgfnoeiflnem",
284 "gnedhmakppccajfpfiihfcdlnpgomkcf", 278 "gnedhmakppccajfpfiihfcdlnpgomkcf",
285 "fjcibdnjlbfnbfdjneajpipnlcppleek", 279 "fjcibdnjlbfnbfdjneajpipnlcppleek",
286 "oflbaaikkabfdfkimeclgkackhdkpnip" // Testing extension. 280 "oflbaaikkabfdfkimeclgkackhdkpnip" // Testing extension.
287 }; 281 };
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 if (!retval.IsEmpty() && !retval->IsUndefined()) { 597 if (!retval.IsEmpty() && !retval->IsUndefined()) {
604 std::string error = *v8::String::AsciiValue(retval); 598 std::string error = *v8::String::AsciiValue(retval);
605 DCHECK(false) << error; 599 DCHECK(false) << error;
606 } 600 }
607 #endif 601 #endif
608 602
609 request->second->context.Dispose(); 603 request->second->context.Dispose();
610 request->second->context.Clear(); 604 request->second->context.Clear();
611 pending_requests.erase(request); 605 pending_requests.erase(request);
612 } 606 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698