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 #include "webkit/browser/appcache/appcache_storage_impl.h" | 5 #include "webkit/browser/appcache/appcache_storage_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 AppCacheHistograms::CountInitResult(AppCacheHistograms::DISK_CACHE_ERROR); | 1804 AppCacheHistograms::CountInitResult(AppCacheHistograms::DISK_CACHE_ERROR); |
1805 | 1805 |
1806 // We're unable to open the disk cache, this is a fatal error that we can't | 1806 // We're unable to open the disk cache, this is a fatal error that we can't |
1807 // really recover from. We handle it by disabling the appcache for this | 1807 // really recover from. We handle it by disabling the appcache for this |
1808 // browser session and deleting the directory on disk. The next browser | 1808 // browser session and deleting the directory on disk. The next browser |
1809 // session should start with a clean slate. | 1809 // session should start with a clean slate. |
1810 Disable(); | 1810 Disable(); |
1811 if (!is_incognito_) { | 1811 if (!is_incognito_) { |
1812 VLOG(1) << "Deleting existing appcache data and starting over."; | 1812 VLOG(1) << "Deleting existing appcache data and starting over."; |
1813 db_thread_->PostTask( | 1813 db_thread_->PostTask( |
1814 FROM_HERE, base::Bind(base::IgnoreResult(&file_util::Delete), | 1814 FROM_HERE, base::Bind(base::IgnoreResult(&base::Delete), |
1815 cache_directory_, true)); | 1815 cache_directory_, true)); |
1816 } | 1816 } |
1817 } | 1817 } |
1818 } | 1818 } |
1819 | 1819 |
1820 } // namespace appcache | 1820 } // namespace appcache |
OLD | NEW |