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

Side by Side Diff: net/base/cookie_monster.cc

Issue 8965046: Coverity: Fixing pass by value bugs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing 100534 Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/apps_promo.cc ('k') | ppapi/cpp/dev/video_decoder_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 this->InvokeCallback(base::Bind(&CookieMonster::SetCookiesCallback::Run, 821 this->InvokeCallback(base::Bind(&CookieMonster::SetCookiesCallback::Run,
822 base::Unretained(&callback_), result)); 822 base::Unretained(&callback_), result));
823 } 823 }
824 } 824 }
825 825
826 // Task class for GetCookiesWithOptions call. 826 // Task class for GetCookiesWithOptions call.
827 class CookieMonster::GetCookiesWithOptionsTask 827 class CookieMonster::GetCookiesWithOptionsTask
828 : public CookieMonster::CookieMonsterTask { 828 : public CookieMonster::CookieMonsterTask {
829 public: 829 public:
830 GetCookiesWithOptionsTask(CookieMonster* cookie_monster, 830 GetCookiesWithOptionsTask(CookieMonster* cookie_monster,
831 GURL url, 831 const GURL& url,
832 const CookieOptions& options, 832 const CookieOptions& options,
833 const CookieMonster::GetCookiesCallback& callback) 833 const CookieMonster::GetCookiesCallback& callback)
834 : CookieMonsterTask(cookie_monster), 834 : CookieMonsterTask(cookie_monster),
835 url_(url), 835 url_(url),
836 options_(options), 836 options_(options),
837 callback_(callback) { } 837 callback_(callback) { }
838 838
839 virtual void Run() OVERRIDE; 839 virtual void Run() OVERRIDE;
840 840
841 private: 841 private:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 base::Unretained(&callback_), 888 base::Unretained(&callback_),
889 cookie_line, cookie_infos)); 889 cookie_line, cookie_infos));
890 } 890 }
891 } 891 }
892 892
893 // Task class for DeleteCookie call. 893 // Task class for DeleteCookie call.
894 class CookieMonster::DeleteCookieTask 894 class CookieMonster::DeleteCookieTask
895 : public CookieMonster::CookieMonsterTask { 895 : public CookieMonster::CookieMonsterTask {
896 public: 896 public:
897 DeleteCookieTask(CookieMonster* cookie_monster, 897 DeleteCookieTask(CookieMonster* cookie_monster,
898 GURL url, 898 const GURL& url,
899 const std::string& cookie_name, 899 const std::string& cookie_name,
900 const base::Closure& callback) 900 const base::Closure& callback)
901 : CookieMonsterTask(cookie_monster), 901 : CookieMonsterTask(cookie_monster),
902 url_(url), 902 url_(url),
903 cookie_name_(cookie_name), 903 cookie_name_(cookie_name),
904 callback_(callback) { } 904 callback_(callback) { }
905 905
906 virtual void Run() OVERRIDE; 906 virtual void Run() OVERRIDE;
907 907
908 private: 908 private:
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2778 std::string CookieMonster::CanonicalCookie::DebugString() const { 2778 std::string CookieMonster::CanonicalCookie::DebugString() const {
2779 return base::StringPrintf( 2779 return base::StringPrintf(
2780 "name: %s value: %s domain: %s path: %s creation: %" 2780 "name: %s value: %s domain: %s path: %s creation: %"
2781 PRId64, 2781 PRId64,
2782 name_.c_str(), value_.c_str(), 2782 name_.c_str(), value_.c_str(),
2783 domain_.c_str(), path_.c_str(), 2783 domain_.c_str(), path_.c_str(),
2784 static_cast<int64>(creation_date_.ToTimeT())); 2784 static_cast<int64>(creation_date_.ToTimeT()));
2785 } 2785 }
2786 2786
2787 } // namespace 2787 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/extensions/apps_promo.cc ('k') | ppapi/cpp/dev/video_decoder_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698