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

Issue 10690154: gdata: Remove a werid behavior from GDataCacheMetadata::UpdateCache() (Closed)

Created:
8 years, 5 months ago by satorux1
Modified:
8 years, 5 months ago
Reviewers:
hshi1
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: Remove a werid behavior from GDataCacheMetadata::UpdateCache() Though it's not documented in the function comment, UpdateCache() had ability to remove an existing cache entry. This is more like a surprising behavior. This patch removes the behavior. Along the way, rename the function to be more descriptive. Also rename RemoveFromCache() to RemoveCacheEntry(). BUG=136921 TEST=out/Release/unit_tests --gtest_filter=GData* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=146251

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -57 lines) Patch
M chrome/browser/chromeos/gdata/gdata_cache.cc View 8 chunks +17 lines, -13 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_cache_metadata.h View 2 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_cache_metadata.cc View 1 chunk +9 lines, -20 lines 2 comments Download
M chrome/browser/chromeos/gdata/gdata_cache_metadata_unittest.cc View 6 chunks +5 lines, -17 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
satorux1
8 years, 5 months ago (2012-07-12 00:19:59 UTC) #1
hshi1
http://codereview.chromium.org/10690154/diff/1/chrome/browser/chromeos/gdata/gdata_cache_metadata.cc File chrome/browser/chromeos/gdata/gdata_cache_metadata.cc (right): http://codereview.chromium.org/10690154/diff/1/chrome/browser/chromeos/gdata/gdata_cache_metadata.cc#newcode187 chrome/browser/chromeos/gdata/gdata_cache_metadata.cc:187: } else { // Resource exists. Can you DCHECK ...
8 years, 5 months ago (2012-07-12 00:27:48 UTC) #2
satorux1
http://codereview.chromium.org/10690154/diff/1/chrome/browser/chromeos/gdata/gdata_cache_metadata.cc File chrome/browser/chromeos/gdata/gdata_cache_metadata.cc (right): http://codereview.chromium.org/10690154/diff/1/chrome/browser/chromeos/gdata/gdata_cache_metadata.cc#newcode187 chrome/browser/chromeos/gdata/gdata_cache_metadata.cc:187: } else { // Resource exists. On 2012/07/12 00:27:48, ...
8 years, 5 months ago (2012-07-12 00:35:31 UTC) #3
hshi1
8 years, 5 months ago (2012-07-12 00:36:15 UTC) #4
I see, LGTM, thanks!.
On 2012/07/12 00:35:31, satorux1 wrote:
>
http://codereview.chromium.org/10690154/diff/1/chrome/browser/chromeos/gdata/...
> File chrome/browser/chromeos/gdata/gdata_cache_metadata.cc (right):
> 
>
http://codereview.chromium.org/10690154/diff/1/chrome/browser/chromeos/gdata/...
> chrome/browser/chromeos/gdata/gdata_cache_metadata.cc:187: } else {  //
Resource
> exists.
> On 2012/07/12 00:27:48, hshi1 wrote:
> > Can you DCHECK here to make sure the cache state is not CACHE_STATE_NONE?
> 
> CACHE_STATE_NONE will be gone, once we change the representation from a
bitmask
> to a set of bools.
> 
> In theory, we could write a function that checks if all bools are false, but
> it's probably not worth doing it.

Powered by Google App Engine
This is Rietveld 408576698