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

Side by Side Diff: content/browser/net/sqlite_persistent_cookie_store.cc

Issue 16703020: Rewrite scoped_ptr<T>(NULL) to use the default ctor in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up insanity Created 7 years, 6 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 | Annotate | Revision Log
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/net/sqlite_persistent_cookie_store.h" 5 #include "content/browser/net/sqlite_persistent_cookie_store.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 class SQLitePersistentCookieStore::Backend 69 class SQLitePersistentCookieStore::Backend
70 : public base::RefCountedThreadSafe<SQLitePersistentCookieStore::Backend> { 70 : public base::RefCountedThreadSafe<SQLitePersistentCookieStore::Backend> {
71 public: 71 public:
72 Backend( 72 Backend(
73 const base::FilePath& path, 73 const base::FilePath& path,
74 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner, 74 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner,
75 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner, 75 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner,
76 bool restore_old_session_cookies, 76 bool restore_old_session_cookies,
77 quota::SpecialStoragePolicy* special_storage_policy) 77 quota::SpecialStoragePolicy* special_storage_policy)
78 : path_(path), 78 : path_(path),
79 db_(NULL),
80 num_pending_(0), 79 num_pending_(0),
81 force_keep_session_state_(false), 80 force_keep_session_state_(false),
82 initialized_(false), 81 initialized_(false),
83 corruption_detected_(false), 82 corruption_detected_(false),
84 restore_old_session_cookies_(restore_old_session_cookies), 83 restore_old_session_cookies_(restore_old_session_cookies),
85 special_storage_policy_(special_storage_policy), 84 special_storage_policy_(special_storage_policy),
86 num_cookies_read_(0), 85 num_cookies_read_(0),
87 client_task_runner_(client_task_runner), 86 client_task_runner_(client_task_runner),
88 background_task_runner_(background_task_runner), 87 background_task_runner_(background_task_runner),
89 num_priority_waiting_(0), 88 num_priority_waiting_(0),
90 total_priority_requests_(0) { 89 total_priority_requests_(0) {}
91 }
92 90
93 // Creates or loads the SQLite database. 91 // Creates or loads the SQLite database.
94 void Load(const LoadedCallback& loaded_callback); 92 void Load(const LoadedCallback& loaded_callback);
95 93
96 // Loads cookies for the domain key (eTLD+1). 94 // Loads cookies for the domain key (eTLD+1).
97 void LoadCookiesForKey(const std::string& domain, 95 void LoadCookiesForKey(const std::string& domain,
98 const LoadedCallback& loaded_callback); 96 const LoadedCallback& loaded_callback);
99 97
100 // Batch a cookie addition. 98 // Batch a cookie addition.
101 void AddCookie(const net::CanonicalCookie& cc); 99 void AddCookie(const net::CanonicalCookie& cc);
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 1199
1202 const std::string cookie_priority_experiment_group = 1200 const std::string cookie_priority_experiment_group =
1203 base::FieldTrialList::FindFullName("CookieRetentionPriorityStudy"); 1201 base::FieldTrialList::FindFullName("CookieRetentionPriorityStudy");
1204 cookie_monster->SetPriorityAwareGarbageCollection( 1202 cookie_monster->SetPriorityAwareGarbageCollection(
1205 cookie_priority_experiment_group == "ExperimentOn"); 1203 cookie_priority_experiment_group == "ExperimentOn");
1206 1204
1207 return cookie_monster; 1205 return cookie_monster;
1208 } 1206 }
1209 1207
1210 } // namespace content 1208 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_browsertest.cc ('k') | content/browser/plugin_data_remover_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698