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

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

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/location.h" 10 #include "base/location.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 const GURL& new_master_resource) { 428 const GURL& new_master_resource) {
429 DCHECK(group_->update_job() == this); 429 DCHECK(group_->update_job() == this);
430 DCHECK(!group_->is_obsolete()); 430 DCHECK(!group_->is_obsolete());
431 431
432 bool is_new_pending_master_entry = false; 432 bool is_new_pending_master_entry = false;
433 if (!new_master_resource.is_empty()) { 433 if (!new_master_resource.is_empty()) {
434 DCHECK(new_master_resource == host->pending_master_entry_url()); 434 DCHECK(new_master_resource == host->pending_master_entry_url());
435 DCHECK(!new_master_resource.has_ref()); 435 DCHECK(!new_master_resource.has_ref());
436 DCHECK(new_master_resource.GetOrigin() == manifest_url_.GetOrigin()); 436 DCHECK(new_master_resource.GetOrigin() == manifest_url_.GetOrigin());
437 437
438 if (ContainsKey(failed_master_entries_, new_master_resource)) 438 if (base::ContainsKey(failed_master_entries_, new_master_resource))
439 return; 439 return;
440 440
441 // Cannot add more to this update if already terminating. 441 // Cannot add more to this update if already terminating.
442 if (IsTerminating()) { 442 if (IsTerminating()) {
443 group_->QueueUpdate(host, new_master_resource); 443 group_->QueueUpdate(host, new_master_resource);
444 return; 444 return;
445 } 445 }
446 446
447 std::pair<PendingMasters::iterator, bool> ret = 447 std::pair<PendingMasters::iterator, bool> ret =
448 pending_master_entries_.insert( 448 pending_master_entries_.insert(
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 // on this object after we've posted a task to delete ourselves. 1708 // on this object after we've posted a task to delete ourselves.
1709 if (group_) { 1709 if (group_) {
1710 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE); 1710 group_->SetUpdateAppCacheStatus(AppCacheGroup::IDLE);
1711 group_ = NULL; 1711 group_ = NULL;
1712 } 1712 }
1713 1713
1714 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); 1714 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
1715 } 1715 }
1716 1716
1717 } // namespace content 1717 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_storage.cc ('k') | content/browser/appcache/appcache_update_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698