| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2  * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 
| 3  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 
| 4  * | 4  * | 
| 5  * Redistribution and use in source and binary forms, with or without | 5  * Redistribution and use in source and binary forms, with or without | 
| 6  * modification, are permitted provided that the following conditions | 6  * modification, are permitted provided that the following conditions | 
| 7  * are met: | 7  * are met: | 
| 8  * 1. Redistributions of source code must retain the above copyright | 8  * 1. 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  * 2. Redistributions in binary form must reproduce the above copyright | 10  * 2. Redistributions in binary form must reproduce the above copyright | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50 | 50 | 
| 51   Database* database = nullptr; | 51   Database* database = nullptr; | 
| 52   DatabaseManager& db_manager = DatabaseManager::Manager(); | 52   DatabaseManager& db_manager = DatabaseManager::Manager(); | 
| 53   DatabaseError error = DatabaseError::kNone; | 53   DatabaseError error = DatabaseError::kNone; | 
| 54   if (RuntimeEnabledFeatures::databaseEnabled() && | 54   if (RuntimeEnabledFeatures::databaseEnabled() && | 
| 55       window.document()->GetSecurityOrigin()->CanAccessDatabase()) { | 55       window.document()->GetSecurityOrigin()->CanAccessDatabase()) { | 
| 56     String error_message; | 56     String error_message; | 
| 57     database = db_manager.OpenDatabase(window.document(), name, version, | 57     database = db_manager.OpenDatabase(window.document(), name, version, | 
| 58                                        display_name, estimated_size, | 58                                        display_name, estimated_size, | 
| 59                                        creation_callback, error, error_message); | 59                                        creation_callback, error, error_message); | 
| 60     ASSERT(database || error != DatabaseError::kNone); | 60     DCHECK(database || error != DatabaseError::kNone); | 
| 61     if (error != DatabaseError::kNone) | 61     if (error != DatabaseError::kNone) | 
| 62       DatabaseManager::ThrowExceptionForDatabaseError(error, error_message, | 62       DatabaseManager::ThrowExceptionForDatabaseError(error, error_message, | 
| 63                                                       exception_state); | 63                                                       exception_state); | 
| 64   } else { | 64   } else { | 
| 65     exception_state.ThrowSecurityError( | 65     exception_state.ThrowSecurityError( | 
| 66         "Access to the WebDatabase API is denied in this context."); | 66         "Access to the WebDatabase API is denied in this context."); | 
| 67   } | 67   } | 
| 68 | 68 | 
| 69   return database; | 69   return database; | 
| 70 } | 70 } | 
| 71 | 71 | 
| 72 }  // namespace blink | 72 }  // namespace blink | 
| OLD | NEW | 
|---|