OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/in_process_webkit/webkit_context.h" | 5 #include "chrome/browser/in_process_webkit/webkit_context.h" |
6 | 6 |
| 7 #include "base/command_line.h" |
7 #include "chrome/browser/chrome_thread.h" | 8 #include "chrome/browser/chrome_thread.h" |
8 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
| 10 #include "chrome/common/chrome_switches.h" |
9 | 11 |
10 WebKitContext::WebKitContext(Profile* profile) | 12 WebKitContext::WebKitContext(Profile* profile) |
11 : data_path_(profile->IsOffTheRecord() ? FilePath() : profile->GetPath()), | 13 : data_path_(profile->IsOffTheRecord() ? FilePath() : profile->GetPath()), |
12 is_incognito_(profile->IsOffTheRecord()), | 14 is_incognito_(profile->IsOffTheRecord()), |
13 ALLOW_THIS_IN_INITIALIZER_LIST( | 15 ALLOW_THIS_IN_INITIALIZER_LIST( |
14 dom_storage_context_(new DOMStorageContext(this))), | 16 dom_storage_context_(new DOMStorageContext(this))), |
15 indexed_db_context_(new IndexedDBContext()) { | 17 indexed_db_context_(new IndexedDBContext()) { |
16 } | 18 } |
17 | 19 |
18 WebKitContext::~WebKitContext() { | 20 WebKitContext::~WebKitContext() { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 ChromeThread::PostTask( | 72 ChromeThread::PostTask( |
71 ChromeThread::WEBKIT, FROM_HERE, | 73 ChromeThread::WEBKIT, FROM_HERE, |
72 NewRunnableMethod(this, &WebKitContext::DeleteSessionStorageNamespace, | 74 NewRunnableMethod(this, &WebKitContext::DeleteSessionStorageNamespace, |
73 session_storage_namespace_id)); | 75 session_storage_namespace_id)); |
74 return; | 76 return; |
75 } | 77 } |
76 | 78 |
77 dom_storage_context_->DeleteSessionStorageNamespace( | 79 dom_storage_context_->DeleteSessionStorageNamespace( |
78 session_storage_namespace_id); | 80 session_storage_namespace_id); |
79 } | 81 } |
OLD | NEW |