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

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

Issue 966843002: Mark DOMStringList.contains() as deprecated, add console warning. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add more detailed use counters Created 5 years, 6 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 IDBRequest* idbRequest = static_cast<IDBRequest*>(event->target()); 113 IDBRequest* idbRequest = static_cast<IDBRequest*>(event->target());
114 IDBAny* requestResult = idbRequest->resultAsAny(); 114 IDBAny* requestResult = idbRequest->resultAsAny();
115 if (requestResult->type() != IDBAny::DOMStringListType) { 115 if (requestResult->type() != IDBAny::DOMStringListType) {
116 m_requestCallback->sendFailure("Unexpected result type."); 116 m_requestCallback->sendFailure("Unexpected result type.");
117 return; 117 return;
118 } 118 }
119 119
120 RefPtrWillBeRawPtr<DOMStringList> databaseNamesList = requestResult->dom StringList(); 120 RefPtrWillBeRawPtr<DOMStringList> databaseNamesList = requestResult->dom StringList();
121 RefPtr<TypeBuilder::Array<String>> databaseNames = TypeBuilder::Array<St ring>::create(); 121 RefPtr<TypeBuilder::Array<String>> databaseNames = TypeBuilder::Array<St ring>::create();
122 for (size_t i = 0; i < databaseNamesList->length(); ++i) 122 for (size_t i = 0; i < databaseNamesList->length(); ++i)
123 databaseNames->addItem(databaseNamesList->item(i)); 123 databaseNames->addItem(databaseNamesList->anonymousIndexedGetter(i)) ;
124 m_requestCallback->sendSuccess(databaseNames.release()); 124 m_requestCallback->sendSuccess(databaseNames.release());
125 } 125 }
126 126
127 private: 127 private:
128 GetDatabaseNamesCallback(PassRefPtrWillBeRawPtr<RequestDatabaseNamesCallback > requestCallback, const String& securityOrigin) 128 GetDatabaseNamesCallback(PassRefPtrWillBeRawPtr<RequestDatabaseNamesCallback > requestCallback, const String& securityOrigin)
129 : EventListener(EventListener::CPPEventListenerType) 129 : EventListener(EventListener::CPPEventListenerType)
130 , m_requestCallback(requestCallback) 130 , m_requestCallback(requestCallback)
131 , m_securityOrigin(securityOrigin) { } 131 , m_securityOrigin(securityOrigin) { }
132 RefPtrWillBePersistent<RequestDatabaseNamesCallback> m_requestCallback; 132 RefPtrWillBePersistent<RequestDatabaseNamesCallback> m_requestCallback;
133 String m_securityOrigin; 133 String m_securityOrigin;
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName ); 783 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName );
784 } 784 }
785 785
786 DEFINE_TRACE(InspectorIndexedDBAgent) 786 DEFINE_TRACE(InspectorIndexedDBAgent)
787 { 787 {
788 visitor->trace(m_page); 788 visitor->trace(m_page);
789 InspectorBaseAgent::trace(visitor); 789 InspectorBaseAgent::trace(visitor);
790 } 790 }
791 791
792 } // namespace blink 792 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698