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

Side by Side Diff: content/browser/cache_storage/cache_storage_cache.cc

Issue 1985383002: Logging and check fail crbug/612358 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaned up logging Created 4 years, 7 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/cache_storage/cache_storage_cache.h" 5 #include "content/browser/cache_storage/cache_storage_cache.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 if (!blob_storage_context_) { 916 if (!blob_storage_context_) {
917 callback.Run(CACHE_STORAGE_ERROR_STORAGE); 917 callback.Run(CACHE_STORAGE_ERROR_STORAGE);
918 return; 918 return;
919 } 919 }
920 blob_data_handle = 920 blob_data_handle =
921 blob_storage_context_->GetBlobDataFromUUID(response->blob_uuid); 921 blob_storage_context_->GetBlobDataFromUUID(response->blob_uuid);
922 if (!blob_data_handle) { 922 if (!blob_data_handle) {
923 callback.Run(CACHE_STORAGE_ERROR_STORAGE); 923 callback.Run(CACHE_STORAGE_ERROR_STORAGE);
924 return; 924 return;
925 } 925 }
926 if (blob_data_handle->IsBroken()) {
927 LOG(ERROR) << "Blob broken";
928 callback.Run(CACHE_STORAGE_ERROR_STORAGE);
929 return;
930 }
926 } 931 }
927 932
928 ErrorCallback pending_callback = 933 ErrorCallback pending_callback =
929 base::Bind(&CacheStorageCache::PendingErrorCallback, 934 base::Bind(&CacheStorageCache::PendingErrorCallback,
930 weak_ptr_factory_.GetWeakPtr(), callback); 935 weak_ptr_factory_.GetWeakPtr(), callback);
931 936
932 std::unique_ptr<PutContext> put_context( 937 std::unique_ptr<PutContext> put_context(
933 new PutContext(std::move(request), std::move(response), 938 new PutContext(std::move(request), std::move(response),
934 std::move(blob_data_handle), pending_callback)); 939 std::move(blob_data_handle), pending_callback));
935 940
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 storage::BlobDataBuilder blob_data(response->blob_uuid); 1543 storage::BlobDataBuilder blob_data(response->blob_uuid);
1539 1544
1540 disk_cache::Entry* temp_entry = entry.get(); 1545 disk_cache::Entry* temp_entry = entry.get();
1541 blob_data.AppendDiskCacheEntryWithSideData( 1546 blob_data.AppendDiskCacheEntryWithSideData(
1542 new CacheStorageCacheDataHandle(this, std::move(entry)), temp_entry, 1547 new CacheStorageCacheDataHandle(this, std::move(entry)), temp_entry,
1543 INDEX_RESPONSE_BODY, INDEX_SIDE_DATA); 1548 INDEX_RESPONSE_BODY, INDEX_SIDE_DATA);
1544 return blob_storage_context_->AddFinishedBlob(&blob_data); 1549 return blob_storage_context_->AddFinishedBlob(&blob_data);
1545 } 1550 }
1546 1551
1547 } // namespace content 1552 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698