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

Side by Side Diff: sql/connection.h

Issue 1533703002: [sql] Consider fresh databases suitable for memory-mapped I/O. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef SQL_CONNECTION_H_ 5 #ifndef SQL_CONNECTION_H_
6 #define SQL_CONNECTION_H_ 6 #define SQL_CONNECTION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 // Statement accesses StatementRef which we don't want to expose to everybody 503 // Statement accesses StatementRef which we don't want to expose to everybody
504 // (they should go through Statement). 504 // (they should go through Statement).
505 friend class Statement; 505 friend class Statement;
506 506
507 friend class test::ScopedCommitHook; 507 friend class test::ScopedCommitHook;
508 friend class test::ScopedScalarFunction; 508 friend class test::ScopedScalarFunction;
509 friend class test::ScopedMockTimeSource; 509 friend class test::ScopedMockTimeSource;
510 510
511 FRIEND_TEST_ALL_PREFIXES(SQLConnectionTest, CollectDiagnosticInfo); 511 FRIEND_TEST_ALL_PREFIXES(SQLConnectionTest, CollectDiagnosticInfo);
512 FRIEND_TEST_ALL_PREFIXES(SQLConnectionTest, GetAppropriateMmapSize);
512 FRIEND_TEST_ALL_PREFIXES(SQLConnectionTest, RegisterIntentToUpload); 513 FRIEND_TEST_ALL_PREFIXES(SQLConnectionTest, RegisterIntentToUpload);
513 514
514 // Internal initialize function used by both Init and InitInMemory. The file 515 // Internal initialize function used by both Init and InitInMemory. The file
515 // name is always 8 bits since we want to use the 8-bit version of 516 // name is always 8 bits since we want to use the 8-bit version of
516 // sqlite3_open. The string can also be sqlite's special ":memory:" string. 517 // sqlite3_open. The string can also be sqlite's special ":memory:" string.
517 // 518 //
518 // |retry_flag| controls retrying the open if the error callback 519 // |retry_flag| controls retrying the open if the error callback
519 // addressed errors using RazeAndClose(). 520 // addressed errors using RazeAndClose().
520 enum Retry { 521 enum Retry {
521 NO_RETRY = 0, 522 NO_RETRY = 0,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 // Source for timing information, provided to allow tests to inject time 793 // Source for timing information, provided to allow tests to inject time
793 // changes. 794 // changes.
794 scoped_ptr<TimeSource> clock_; 795 scoped_ptr<TimeSource> clock_;
795 796
796 DISALLOW_COPY_AND_ASSIGN(Connection); 797 DISALLOW_COPY_AND_ASSIGN(Connection);
797 }; 798 };
798 799
799 } // namespace sql 800 } // namespace sql
800 801
801 #endif // SQL_CONNECTION_H_ 802 #endif // SQL_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698