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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/SQLResultSet.cpp

Issue 2395473002: reflow comments in modules/webdatabase (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 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 * 7 *
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 m_isValid(false) { 42 m_isValid(false) {
43 DCHECK(isMainThread()); 43 DCHECK(isMainThread());
44 } 44 }
45 45
46 DEFINE_TRACE(SQLResultSet) { 46 DEFINE_TRACE(SQLResultSet) {
47 visitor->trace(m_rows); 47 visitor->trace(m_rows);
48 } 48 }
49 49
50 int64_t SQLResultSet::insertId(ExceptionState& exceptionState) const { 50 int64_t SQLResultSet::insertId(ExceptionState& exceptionState) const {
51 // 4.11.4 - Return the id of the last row inserted as a result of the query 51 // 4.11.4 - Return the id of the last row inserted as a result of the query
52 // If the query didn't result in any rows being added, raise an InvalidAccessE rror exception 52 // If the query didn't result in any rows being added, raise an
53 // InvalidAccessError exception.
53 if (m_insertIdSet) 54 if (m_insertIdSet)
54 return m_insertId; 55 return m_insertId;
55 56
56 exceptionState.throwDOMException( 57 exceptionState.throwDOMException(
57 InvalidAccessError, "The query didn't result in any rows being added."); 58 InvalidAccessError, "The query didn't result in any rows being added.");
58 return -1; 59 return -1;
59 } 60 }
60 61
61 int SQLResultSet::rowsAffected() const { 62 int SQLResultSet::rowsAffected() const {
62 return m_rowsAffected; 63 return m_rowsAffected;
63 } 64 }
64 65
65 SQLResultSetRowList* SQLResultSet::rows() const { 66 SQLResultSetRowList* SQLResultSet::rows() const {
66 return m_rows.get(); 67 return m_rows.get();
67 } 68 }
68 69
69 void SQLResultSet::setInsertId(int64_t id) { 70 void SQLResultSet::setInsertId(int64_t id) {
70 ASSERT(!m_insertIdSet); 71 ASSERT(!m_insertIdSet);
71 72
72 m_insertId = id; 73 m_insertId = id;
73 m_insertIdSet = true; 74 m_insertIdSet = true;
74 } 75 }
75 76
76 void SQLResultSet::setRowsAffected(int count) { 77 void SQLResultSet::setRowsAffected(int count) {
77 m_rowsAffected = count; 78 m_rowsAffected = count;
78 m_isValid = true; 79 m_isValid = true;
79 } 80 }
80 81
81 } // namespace blink 82 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698