OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/plugin_private_storage_helper.h" | 5 #include "content/browser/plugin_private_storage_helper.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 388 |
389 if (origins.empty()) { | 389 if (origins.empty()) { |
390 // No origins, so nothing to do. | 390 // No origins, so nothing to do. |
391 callback.Run(); | 391 callback.Run(); |
392 return; | 392 return; |
393 } | 393 } |
394 | 394 |
395 // If a specific origin is provided, then check that it is in the list | 395 // If a specific origin is provided, then check that it is in the list |
396 // returned and remove all the other origins. | 396 // returned and remove all the other origins. |
397 if (!storage_origin.is_empty()) { | 397 if (!storage_origin.is_empty()) { |
398 if (!ContainsKey(origins, storage_origin)) { | 398 if (!base::ContainsKey(origins, storage_origin)) { |
399 // Nothing matches, so nothing to do. | 399 // Nothing matches, so nothing to do. |
400 callback.Run(); | 400 callback.Run(); |
401 return; | 401 return; |
402 } | 402 } |
403 | 403 |
404 // List should only contain the one value that matches. | 404 // List should only contain the one value that matches. |
405 origins.clear(); | 405 origins.clear(); |
406 origins.insert(storage_origin); | 406 origins.insert(storage_origin); |
407 } | 407 } |
408 | 408 |
409 PluginPrivateDataDeletionHelper* helper = new PluginPrivateDataDeletionHelper( | 409 PluginPrivateDataDeletionHelper* helper = new PluginPrivateDataDeletionHelper( |
410 std::move(filesystem_context), begin, end, callback); | 410 std::move(filesystem_context), begin, end, callback); |
411 helper->CheckOriginsOnFileTaskRunner(origins); | 411 helper->CheckOriginsOnFileTaskRunner(origins); |
412 // |helper| will delete itself when all origins have been checked. | 412 // |helper| will delete itself when all origins have been checked. |
413 } | 413 } |
414 | 414 |
415 } // namespace content | 415 } // namespace content |
OLD | NEW |