| 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 "chrome/browser/extensions/api/browsing_data/browsing_data_api.h" | 5 #include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 using extension_function_test_utils::RunFunctionAndReturnError; | 22 using extension_function_test_utils::RunFunctionAndReturnError; |
| 23 using extension_function_test_utils::RunFunctionAndReturnResult; | 23 using extension_function_test_utils::RunFunctionAndReturnResult; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 const char kRemoveEverythingArguments[] = "[{\"since\": 1000}, {" | 27 const char kRemoveEverythingArguments[] = "[{\"since\": 1000}, {" |
| 28 "\"appcache\": true, \"cache\": true, \"cookies\": true, " | 28 "\"appcache\": true, \"cache\": true, \"cookies\": true, " |
| 29 "\"downloads\": true, \"fileSystems\": true, \"formData\": true, " | 29 "\"downloads\": true, \"fileSystems\": true, \"formData\": true, " |
| 30 "\"history\": true, \"indexedDB\": true, \"localStorage\": true, " | 30 "\"history\": true, \"indexedDB\": true, \"localStorage\": true, " |
| 31 "\"originBoundCerts\": true, \"passwords\": true, \"pluginData\": true, " | 31 "\"serverBoundCerts\": true, \"passwords\": true, \"pluginData\": true, " |
| 32 "\"webSQL\": true" | 32 "\"webSQL\": true" |
| 33 "}]"; | 33 "}]"; |
| 34 | 34 |
| 35 class ExtensionBrowsingDataTest : public InProcessBrowserTest, | 35 class ExtensionBrowsingDataTest : public InProcessBrowserTest, |
| 36 public content::NotificationObserver { | 36 public content::NotificationObserver { |
| 37 public: | 37 public: |
| 38 base::Time GetBeginTime() { | 38 base::Time GetBeginTime() { |
| 39 return called_with_details_->removal_begin; | 39 return called_with_details_->removal_begin; |
| 40 } | 40 } |
| 41 | 41 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 "fileSystems", BrowsingDataRemover::REMOVE_FILE_SYSTEMS); | 124 "fileSystems", BrowsingDataRemover::REMOVE_FILE_SYSTEMS); |
| 125 RunRemoveBrowsingDataFunctionAndCompareMask( | 125 RunRemoveBrowsingDataFunctionAndCompareMask( |
| 126 "formData", BrowsingDataRemover::REMOVE_FORM_DATA); | 126 "formData", BrowsingDataRemover::REMOVE_FORM_DATA); |
| 127 RunRemoveBrowsingDataFunctionAndCompareMask( | 127 RunRemoveBrowsingDataFunctionAndCompareMask( |
| 128 "history", BrowsingDataRemover::REMOVE_HISTORY); | 128 "history", BrowsingDataRemover::REMOVE_HISTORY); |
| 129 RunRemoveBrowsingDataFunctionAndCompareMask( | 129 RunRemoveBrowsingDataFunctionAndCompareMask( |
| 130 "indexedDB", BrowsingDataRemover::REMOVE_INDEXEDDB); | 130 "indexedDB", BrowsingDataRemover::REMOVE_INDEXEDDB); |
| 131 RunRemoveBrowsingDataFunctionAndCompareMask( | 131 RunRemoveBrowsingDataFunctionAndCompareMask( |
| 132 "localStorage", BrowsingDataRemover::REMOVE_LOCAL_STORAGE); | 132 "localStorage", BrowsingDataRemover::REMOVE_LOCAL_STORAGE); |
| 133 RunRemoveBrowsingDataFunctionAndCompareMask( | 133 RunRemoveBrowsingDataFunctionAndCompareMask( |
| 134 "originBoundCerts", BrowsingDataRemover::REMOVE_ORIGIN_BOUND_CERTS); | 134 "serverBoundCerts", BrowsingDataRemover::REMOVE_SERVER_BOUND_CERTS); |
| 135 RunRemoveBrowsingDataFunctionAndCompareMask( | 135 RunRemoveBrowsingDataFunctionAndCompareMask( |
| 136 "passwords", BrowsingDataRemover::REMOVE_PASSWORDS); | 136 "passwords", BrowsingDataRemover::REMOVE_PASSWORDS); |
| 137 // We can't remove plugin data inside a test profile. | 137 // We can't remove plugin data inside a test profile. |
| 138 RunRemoveBrowsingDataFunctionAndCompareMask( | 138 RunRemoveBrowsingDataFunctionAndCompareMask( |
| 139 "webSQL", BrowsingDataRemover::REMOVE_WEBSQL); | 139 "webSQL", BrowsingDataRemover::REMOVE_WEBSQL); |
| 140 } | 140 } |
| OLD | NEW |