OLD | NEW |
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 // Portions of this code based on Mozilla: | 5 // Portions of this code based on Mozilla: |
6 // (netwerk/cookie/src/nsCookieService.cpp) | 6 // (netwerk/cookie/src/nsCookieService.cpp) |
7 /* ***** BEGIN LICENSE BLOCK ***** | 7 /* ***** BEGIN LICENSE BLOCK ***** |
8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
9 * | 9 * |
10 * The contents of this file are subject to the Mozilla Public License Version | 10 * The contents of this file are subject to the Mozilla Public License Version |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 | 550 |
551 // Base task class for Delete*Task. | 551 // Base task class for Delete*Task. |
552 template <typename Result> | 552 template <typename Result> |
553 class CookieMonster::DeleteTask : public CookieMonsterTask { | 553 class CookieMonster::DeleteTask : public CookieMonsterTask { |
554 public: | 554 public: |
555 DeleteTask(CookieMonster* cookie_monster, | 555 DeleteTask(CookieMonster* cookie_monster, |
556 const typename CallbackType<Result>::Type& callback) | 556 const typename CallbackType<Result>::Type& callback) |
557 : CookieMonsterTask(cookie_monster), callback_(callback) {} | 557 : CookieMonsterTask(cookie_monster), callback_(callback) {} |
558 | 558 |
559 // CookieMonsterTask: | 559 // CookieMonsterTask: |
560 virtual void Run() override; | 560 void Run() override; |
561 | 561 |
562 protected: | 562 protected: |
563 ~DeleteTask() override; | 563 ~DeleteTask() override; |
564 | 564 |
565 private: | 565 private: |
566 // Runs the delete task and returns a result. | 566 // Runs the delete task and returns a result. |
567 virtual Result RunDeleteTask() = 0; | 567 virtual Result RunDeleteTask() = 0; |
568 base::Closure RunDeleteTaskAndBindCallback(); | 568 base::Closure RunDeleteTaskAndBindCallback(); |
569 void FlushDone(const base::Closure& callback); | 569 void FlushDone(const base::Closure& callback); |
570 | 570 |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2412 it != hook_map_.end(); ++it) { | 2412 it != hook_map_.end(); ++it) { |
2413 std::pair<GURL, std::string> key = it->first; | 2413 std::pair<GURL, std::string> key = it->first; |
2414 if (cookie.IncludeForRequestURL(key.first, opts) && | 2414 if (cookie.IncludeForRequestURL(key.first, opts) && |
2415 cookie.Name() == key.second) { | 2415 cookie.Name() == key.second) { |
2416 it->second->Notify(cookie, removed); | 2416 it->second->Notify(cookie, removed); |
2417 } | 2417 } |
2418 } | 2418 } |
2419 } | 2419 } |
2420 | 2420 |
2421 } // namespace net | 2421 } // namespace net |
OLD | NEW |