Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: content/browser/plugin_private_storage_helper.cc

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698