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

Side by Side Diff: Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 return document; 597 return document;
598 } 598 }
599 599
600 static IDBFactory* assertIDBFactory(ErrorString* errorString, Document* document ) 600 static IDBFactory* assertIDBFactory(ErrorString* errorString, Document* document )
601 { 601 {
602 DOMWindow* domWindow = document->domWindow(); 602 DOMWindow* domWindow = document->domWindow();
603 if (!domWindow) { 603 if (!domWindow) {
604 *errorString = "No IndexedDB factory for given frame found"; 604 *errorString = "No IndexedDB factory for given frame found";
605 return 0; 605 return 0;
606 } 606 }
607 IDBFactory* idbFactory = DOMWindowIndexedDatabase::indexedDB(domWindow); 607 IDBFactory* idbFactory = DOMWindowIndexedDatabase::indexedDB(*domWindow);
608 608
609 if (!idbFactory) 609 if (!idbFactory)
610 *errorString = "No IndexedDB factory for given frame found"; 610 *errorString = "No IndexedDB factory for given frame found";
611 611
612 return idbFactory; 612 return idbFactory;
613 } 613 }
614 614
615 void InspectorIndexedDBAgent::requestDatabaseNames(ErrorString* errorString, con st String& securityOrigin, PassRefPtr<RequestDatabaseNamesCallback> requestCallb ack) 615 void InspectorIndexedDBAgent::requestDatabaseNames(ErrorString* errorString, con st String& securityOrigin, PassRefPtr<RequestDatabaseNamesCallback> requestCallb ack)
616 { 616 {
617 Frame* frame = findFrameWithSecurityOrigin(m_page, securityOrigin); 617 Frame* frame = findFrameWithSecurityOrigin(m_page, securityOrigin);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 v8::HandleScope handleScope(isolate); 785 v8::HandleScope handleScope(isolate);
786 v8::Handle<v8::Context> context = toV8Context(isolate, document->frame(), DO MWrapperWorld::mainWorld()); 786 v8::Handle<v8::Context> context = toV8Context(isolate, document->frame(), DO MWrapperWorld::mainWorld());
787 ASSERT(!context.IsEmpty()); 787 ASSERT(!context.IsEmpty());
788 v8::Context::Scope contextScope(context); 788 v8::Context::Scope contextScope(context);
789 789
790 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(documen t, objectStoreName, requestCallback); 790 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(documen t, objectStoreName, requestCallback);
791 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName ); 791 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName );
792 } 792 }
793 793
794 } // namespace WebCore 794 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698