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

Side by Side Diff: Source/modules/webdatabase/Database.cpp

Issue 660873004: Remove isSyncDatabase in WebDatabaseObserver [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 711
712 // These are used to generate histograms of errors seen with websql. 712 // These are used to generate histograms of errors seen with websql.
713 // See about:histograms in chromium. 713 // See about:histograms in chromium.
714 void Database::reportOpenDatabaseResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode) 714 void Database::reportOpenDatabaseResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode)
715 { 715 {
716 if (Platform::current()->databaseObserver()) { 716 if (Platform::current()->databaseObserver()) {
717 Platform::current()->databaseObserver()->reportOpenDatabaseResult( 717 Platform::current()->databaseObserver()->reportOpenDatabaseResult(
718 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), 718 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
719 stringIdentifier(), false, 719 stringIdentifier(), false,
720 errorSite, webSqlErrorCode, sqliteErrorCode); 720 errorSite, webSqlErrorCode, sqliteErrorCode);
721 Platform::current()->databaseObserver()->reportOpenDatabaseResult(
722 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
723 stringIdentifier(), errorSite, webSqlErrorCode, sqliteErrorCode);
kinuko 2014/10/27 06:31:40 I don't think we should do this.
721 } 724 }
722 } 725 }
723 726
724 void Database::reportChangeVersionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode) 727 void Database::reportChangeVersionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode)
725 { 728 {
726 if (Platform::current()->databaseObserver()) { 729 if (Platform::current()->databaseObserver()) {
727 Platform::current()->databaseObserver()->reportChangeVersionResult( 730 Platform::current()->databaseObserver()->reportChangeVersionResult(
728 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), 731 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
729 stringIdentifier(), false, 732 stringIdentifier(), false,
730 errorSite, webSqlErrorCode, sqliteErrorCode); 733 errorSite, webSqlErrorCode, sqliteErrorCode);
734 Platform::current()->databaseObserver()->reportChangeVersionResult(
735 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
736 stringIdentifier(), errorSite, webSqlErrorCode, sqliteErrorCode);
731 } 737 }
732 } 738 }
733 739
734 void Database::reportStartTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode) 740 void Database::reportStartTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode)
735 { 741 {
736 if (Platform::current()->databaseObserver()) { 742 if (Platform::current()->databaseObserver()) {
737 Platform::current()->databaseObserver()->reportStartTransactionResult( 743 Platform::current()->databaseObserver()->reportStartTransactionResult(
738 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), 744 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
739 stringIdentifier(), false, 745 stringIdentifier(), false,
740 errorSite, webSqlErrorCode, sqliteErrorCode); 746 errorSite, webSqlErrorCode, sqliteErrorCode);
747 Platform::current()->databaseObserver()->reportStartTransactionResult(
748 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
749 stringIdentifier(), errorSite, webSqlErrorCode, sqliteErrorCode);
741 } 750 }
742 } 751 }
743 752
744 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode) 753 void Database::reportCommitTransactionResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode)
745 { 754 {
746 if (Platform::current()->databaseObserver()) { 755 if (Platform::current()->databaseObserver()) {
747 Platform::current()->databaseObserver()->reportCommitTransactionResult( 756 Platform::current()->databaseObserver()->reportCommitTransactionResult(
748 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), 757 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
749 stringIdentifier(), false, 758 stringIdentifier(), false,
750 errorSite, webSqlErrorCode, sqliteErrorCode); 759 errorSite, webSqlErrorCode, sqliteErrorCode);
760 Platform::current()->databaseObserver()->reportCommitTransactionResult(
761 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
762 stringIdentifier(), errorSite, webSqlErrorCode, sqliteErrorCode);
751 } 763 }
752 } 764 }
753 765
754 void Database::reportExecuteStatementResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode) 766 void Database::reportExecuteStatementResult(int errorSite, int webSqlErrorCode, int sqliteErrorCode)
755 { 767 {
756 if (Platform::current()->databaseObserver()) { 768 if (Platform::current()->databaseObserver()) {
757 Platform::current()->databaseObserver()->reportExecuteStatementResult( 769 Platform::current()->databaseObserver()->reportExecuteStatementResult(
758 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), 770 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
759 stringIdentifier(), false, 771 stringIdentifier(), false,
760 errorSite, webSqlErrorCode, sqliteErrorCode); 772 errorSite, webSqlErrorCode, sqliteErrorCode);
773 Platform::current()->databaseObserver()->reportExecuteStatementResult(
774 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
775 stringIdentifier(), errorSite, webSqlErrorCode, sqliteErrorCode);
761 } 776 }
762 } 777 }
763 778
764 void Database::reportVacuumDatabaseResult(int sqliteErrorCode) 779 void Database::reportVacuumDatabaseResult(int sqliteErrorCode)
765 { 780 {
766 if (Platform::current()->databaseObserver()) { 781 if (Platform::current()->databaseObserver()) {
767 Platform::current()->databaseObserver()->reportVacuumDatabaseResult( 782 Platform::current()->databaseObserver()->reportVacuumDatabaseResult(
768 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()), 783 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
769 stringIdentifier(), false, sqliteErrorCode); 784 stringIdentifier(), false, sqliteErrorCode);
785 Platform::current()->databaseObserver()->reportVacuumDatabaseResult(
786 createDatabaseIdentifierFromSecurityOrigin(securityOrigin()),
787 stringIdentifier(), sqliteErrorCode);
770 } 788 }
771 } 789 }
772 790
773 void Database::logErrorMessage(const String& message) 791 void Database::logErrorMessage(const String& message)
774 { 792 {
775 executionContext()->addConsoleMessage(ConsoleMessage::create(StorageMessageS ource, ErrorMessageLevel, message)); 793 executionContext()->addConsoleMessage(ConsoleMessage::create(StorageMessageS ource, ErrorMessageLevel, message));
776 } 794 }
777 795
778 ExecutionContext* Database::executionContext() const 796 ExecutionContext* Database::executionContext() const
779 { 797 {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 SecurityOrigin* Database::securityOrigin() const 942 SecurityOrigin* Database::securityOrigin() const
925 { 943 {
926 if (executionContext()->isContextThread()) 944 if (executionContext()->isContextThread())
927 return m_contextThreadSecurityOrigin.get(); 945 return m_contextThreadSecurityOrigin.get();
928 if (databaseContext()->databaseThread()->isDatabaseThread()) 946 if (databaseContext()->databaseThread()->isDatabaseThread())
929 return m_databaseThreadSecurityOrigin.get(); 947 return m_databaseThreadSecurityOrigin.get();
930 return 0; 948 return 0;
931 } 949 }
932 950
933 } // namespace blink 951 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/platform/WebDatabaseObserver.h » ('j') | public/platform/WebDatabaseObserver.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698