OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "chrome/browser/browser_shutdown.h" | 8 #include "chrome/browser/browser_shutdown.h" |
9 #include "chrome/browser/prefs/session_startup_pref.h" | 9 #include "chrome/browser/prefs/session_startup_pref.h" |
10 #include "chrome/browser/profiles/profile_io_data.h" | 10 #include "chrome/browser/profiles/profile_io_data.h" |
11 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 11 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
12 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "content/public/browser/dom_storage_context.h" | 14 #include "content/public/browser/dom_storage_context.h" |
15 #include "content/public/browser/local_storage_usage_info.h" | 15 #include "content/public/browser/local_storage_usage_info.h" |
16 #include "content/public/browser/storage_partition.h" | 16 #include "content/public/browser/storage_partition.h" |
17 #include "net/cookies/cookie_monster.h" | 17 #include "net/cookies/cookie_monster.h" |
18 #include "net/cookies/cookie_store.h" | 18 #include "net/cookies/cookie_store.h" |
19 #include "net/cookies/cookie_util.h" | 19 #include "net/cookies/cookie_util.h" |
20 #include "net/url_request/url_request_context.h" | 20 #include "net/url_request/url_request_context.h" |
21 #include "webkit/browser/quota/special_storage_policy.h" | 21 #include "storage/browser/quota/special_storage_policy.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 void CookieDeleted(bool success) { | 25 void CookieDeleted(bool success) { |
26 DCHECK(success); | 26 DCHECK(success); |
27 } | 27 } |
28 | 28 |
29 class SessionDataDeleter | 29 class SessionDataDeleter |
30 : public base::RefCountedThreadSafe<SessionDataDeleter> { | 30 : public base::RefCountedThreadSafe<SessionDataDeleter> { |
31 public: | 31 public: |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 *CommandLine::ForCurrentProcess(), profile).type; | 154 *CommandLine::ForCurrentProcess(), profile).type; |
155 #endif | 155 #endif |
156 | 156 |
157 scoped_refptr<SessionDataDeleter> deleter( | 157 scoped_refptr<SessionDataDeleter> deleter( |
158 new SessionDataDeleter(profile->GetSpecialStoragePolicy(), | 158 new SessionDataDeleter(profile->GetSpecialStoragePolicy(), |
159 startup_pref_type == SessionStartupPref::LAST)); | 159 startup_pref_type == SessionStartupPref::LAST)); |
160 deleter->Run( | 160 deleter->Run( |
161 Profile::GetDefaultStoragePartition(profile), | 161 Profile::GetDefaultStoragePartition(profile), |
162 ProfileIOData::FromResourceContext(profile->GetResourceContext())); | 162 ProfileIOData::FromResourceContext(profile->GetResourceContext())); |
163 } | 163 } |
OLD | NEW |