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

Issue 10701118: gdata: Fix a bug in GDataLevelDB where errors are not handled right (Closed)

Created:
8 years, 5 months ago by satorux1
Modified:
8 years, 5 months ago
Reviewers:
achuithb
CC:
chromium-reviews, achuith+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

gdata: Fix a bug in GDataLevelDB where errors are not handled right GDataEntry::FromProtoString() fails if incompatible proto is detected We should return an error rather than DCHECK it. See crbug.com/142912 for how incompatible proto is rejected. BUG=127856 TEST=out/Release/unit_tests --gtest_filter=GDataDBTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=145950

Patch Set 1 #

Total comments: 5

Patch Set 2 : address comments #

Patch Set 3 : polish indentation #

Total comments: 2

Patch Set 4 : fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -10 lines) Patch
M chrome/browser/chromeos/gdata/gdata_db.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_db_unittest.cc View 1 6 chunks +58 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_leveldb.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_leveldb.cc View 1 3 chunks +15 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
satorux1
https://chromiumcodereview.appspot.com/10701118/diff/1/chrome/browser/chromeos/gdata/gdata_db_unittest.cc File chrome/browser/chromeos/gdata/gdata_db_unittest.cc (right): https://chromiumcodereview.appspot.com/10701118/diff/1/chrome/browser/chromeos/gdata/gdata_db_unittest.cc#newcode205 chrome/browser/chromeos/gdata/gdata_db_unittest.cc:205: ASSERT_EQ(GDataDB::DB_OK, status); change it to ASSERT. We shouldn't go ...
8 years, 5 months ago (2012-07-10 17:10:17 UTC) #1
achuithb
http://codereview.chromium.org/10701118/diff/1/chrome/browser/chromeos/gdata/gdata_db.h File chrome/browser/chromeos/gdata/gdata_db.h (right): http://codereview.chromium.org/10701118/diff/1/chrome/browser/chromeos/gdata/gdata_db.h#newcode60 chrome/browser/chromeos/gdata/gdata_db.h:60: const google::protobuf::MessageLite& protobuf) = 0; Any reason why we ...
8 years, 5 months ago (2012-07-10 17:21:18 UTC) #2
satorux1
http://codereview.chromium.org/10701118/diff/1/chrome/browser/chromeos/gdata/gdata_db.h File chrome/browser/chromeos/gdata/gdata_db.h (right): http://codereview.chromium.org/10701118/diff/1/chrome/browser/chromeos/gdata/gdata_db.h#newcode60 chrome/browser/chromeos/gdata/gdata_db.h:60: const google::protobuf::MessageLite& protobuf) = 0; On 2012/07/10 17:21:19, achuith.bhandarkar ...
8 years, 5 months ago (2012-07-10 17:28:32 UTC) #3
achuithb
lgtm. Thanks! http://codereview.chromium.org/10701118/diff/2002/chrome/browser/chromeos/gdata/gdata_db.h File chrome/browser/chromeos/gdata/gdata_db.h (right): http://codereview.chromium.org/10701118/diff/2002/chrome/browser/chromeos/gdata/gdata_db.h#newcode51 chrome/browser/chromeos/gdata/gdata_db.h:51: // Used for testing (ex. injecting incompatibe ...
8 years, 5 months ago (2012-07-10 18:42:55 UTC) #4
satorux1
8 years, 5 months ago (2012-07-10 20:11:24 UTC) #5
will submit shortly

http://codereview.chromium.org/10701118/diff/2002/chrome/browser/chromeos/gda...
File chrome/browser/chromeos/gdata/gdata_db.h (right):

http://codereview.chromium.org/10701118/diff/2002/chrome/browser/chromeos/gda...
chrome/browser/chromeos/gdata/gdata_db.h:51: // Used for testing (ex. injecting
incompatibe proto).
On 2012/07/10 18:42:55, achuith.bhandarkar wrote:
> nit: spelling incompatible

Done.

Powered by Google App Engine
This is Rietveld 408576698