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

Side by Side Diff: sql/connection.cc

Issue 1200053004: Move more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « rlz/win/lib/machine_deal.cc ('k') | storage/browser/database/database_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "sql/connection.h" 5 #include "sql/connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 805
806 // sqlite3_finalize() returns SQLITE_OK if the most recent sqlite3_step() 806 // sqlite3_finalize() returns SQLITE_OK if the most recent sqlite3_step()
807 // returned SQLITE_DONE or SQLITE_ROW, otherwise the error code. 807 // returned SQLITE_DONE or SQLITE_ROW, otherwise the error code.
808 rc = sqlite3_finalize(stmt); 808 rc = sqlite3_finalize(stmt);
809 if (rc == SQLITE_OK) 809 if (rc == SQLITE_OK)
810 RecordOneEvent(Connection::EVENT_STATEMENT_SUCCESS); 810 RecordOneEvent(Connection::EVENT_STATEMENT_SUCCESS);
811 811
812 // sqlite3_exec() does this, presumably to avoid spinning the parser for 812 // sqlite3_exec() does this, presumably to avoid spinning the parser for
813 // trailing whitespace. 813 // trailing whitespace.
814 // TODO(shess): Audit to see if this can become a DCHECK. 814 // TODO(shess): Audit to see if this can become a DCHECK.
815 while (IsAsciiWhitespace(*sql)) { 815 while (base::IsAsciiWhitespace(*sql)) {
816 sql++; 816 sql++;
817 } 817 }
818 818
819 const base::TimeDelta delta = Now() - before; 819 const base::TimeDelta delta = Now() - before;
820 RecordTimeAndChanges(delta, read_only); 820 RecordTimeAndChanges(delta, read_only);
821 } 821 }
822 return rc; 822 return rc;
823 } 823 }
824 824
825 bool Connection::Execute(const char* sql) { 825 bool Connection::Execute(const char* sql) {
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 ignore_result(Execute(kNoWritableSchema)); 1336 ignore_result(Execute(kNoWritableSchema));
1337 1337
1338 return ret; 1338 return ret;
1339 } 1339 }
1340 1340
1341 base::TimeTicks TimeSource::Now() { 1341 base::TimeTicks TimeSource::Now() {
1342 return base::TimeTicks::Now(); 1342 return base::TimeTicks::Now();
1343 } 1343 }
1344 1344
1345 } // namespace sql 1345 } // namespace sql
OLDNEW
« no previous file with comments | « rlz/win/lib/machine_deal.cc ('k') | storage/browser/database/database_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698