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

Side by Side Diff: content/browser/appcache/appcache_update_job.cc

Issue 1875463002: Remove unused fields from //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scythe-root
Patch Set: Fixed Ozone build. Created 4 years, 8 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 (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 "content/browser/appcache/appcache_update_job.h" 5 #include "content/browser/appcache/appcache_update_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 491 }
492 492
493 BrowserThread::PostAfterStartupTask( 493 BrowserThread::PostAfterStartupTask(
494 FROM_HERE, base::ThreadTaskRunnerHandle::Get(), 494 FROM_HERE, base::ThreadTaskRunnerHandle::Get(),
495 base::Bind(&AppCacheUpdateJob::FetchManifest, weak_factory_.GetWeakPtr(), 495 base::Bind(&AppCacheUpdateJob::FetchManifest, weak_factory_.GetWeakPtr(),
496 true)); 496 true));
497 } 497 }
498 498
499 AppCacheResponseWriter* AppCacheUpdateJob::CreateResponseWriter() { 499 AppCacheResponseWriter* AppCacheUpdateJob::CreateResponseWriter() {
500 AppCacheResponseWriter* writer = 500 AppCacheResponseWriter* writer =
501 storage_->CreateResponseWriter(manifest_url_, 501 storage_->CreateResponseWriter(manifest_url_);
502 group_->group_id());
503 stored_response_ids_.push_back(writer->response_id()); 502 stored_response_ids_.push_back(writer->response_id());
504 return writer; 503 return writer;
505 } 504 }
506 505
507 void AppCacheUpdateJob::HandleCacheFailure( 506 void AppCacheUpdateJob::HandleCacheFailure(
508 const AppCacheErrorDetails& error_details, 507 const AppCacheErrorDetails& error_details,
509 ResultType result, 508 ResultType result,
510 const GURL& failed_resource_url) { 509 const GURL& failed_resource_url) {
511 // 6.9.4 cache failure steps 2-8. 510 // 6.9.4 cache failure steps 2-8.
512 DCHECK(internal_state_ != CACHE_FAILURE); 511 DCHECK(internal_state_ != CACHE_FAILURE);
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 GURL()); 1152 GURL());
1154 AppCacheHistograms::AddMissingManifestEntrySample(); 1153 AppCacheHistograms::AddMissingManifestEntrySample();
1155 service->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback()); 1154 service->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback());
1156 } 1155 }
1157 return; 1156 return;
1158 } 1157 }
1159 1158
1160 // Load manifest data from storage to compare against fetched manifest. 1159 // Load manifest data from storage to compare against fetched manifest.
1161 manifest_response_reader_.reset( 1160 manifest_response_reader_.reset(
1162 storage_->CreateResponseReader(manifest_url_, 1161 storage_->CreateResponseReader(manifest_url_,
1163 group_->group_id(),
1164 entry->response_id())); 1162 entry->response_id()));
1165 read_manifest_buffer_ = new net::IOBuffer(kBufferSize); 1163 read_manifest_buffer_ = new net::IOBuffer(kBufferSize);
1166 manifest_response_reader_->ReadData( 1164 manifest_response_reader_->ReadData(
1167 read_manifest_buffer_.get(), 1165 read_manifest_buffer_.get(),
1168 kBufferSize, 1166 kBufferSize,
1169 base::Bind(&AppCacheUpdateJob::OnManifestDataReadComplete, 1167 base::Bind(&AppCacheUpdateJob::OnManifestDataReadComplete,
1170 base::Unretained(this))); // async read 1168 base::Unretained(this))); // async read
1171 } 1169 }
1172 1170
1173 void AppCacheUpdateJob::OnManifestDataReadComplete(int result) { 1171 void AppCacheUpdateJob::OnManifestDataReadComplete(int result) {
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 // on this object after we've posted a task to delete ourselves. 1709 // on this object after we've posted a task to delete ourselves.
1712 if (group_) { 1710 if (group_) {
1713 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE); 1711 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE);
1714 group_ = NULL; 1712 group_ = NULL;
1715 } 1713 }
1716 1714
1717 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 1715 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
1718 } 1716 }
1719 1717
1720 } // namespace content 1718 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698