Commit 7daf4834 authored by Etienne Pierre-doray's avatar Etienne Pierre-doray Committed by Commit Bot

Remove unnecessary AssertBlockingAllowed() in /components/bookmarks.

Original CL intention was:
This CL uses ScopedBlockingCall to mark blocking calls in /components/bookmarks.

This CL was created by replacing calls to AssertBlockingAllowed()
with instantiations of ScopedBlockingCall(MAY_BLOCK).
I kindly ask the reviewer to make sure of the following:
  - ScopedBlockingCall is instantiated in a scope with minimal CPU usage.
    If this is not the case, ScopedBlockingCall should be instantiated
    closer to the blocking call. See scoped_blocking_call.h for more
    info. Please let me know when/where the blocking call happens if this needs
    to be changed.
  - Parameter |blocking_type| matches expectation (MAY_BLOCK/WILL_BLOCK). See
    BlockingType for more info. While I assumed MAY_BLOCK by default, that might
    not be the best fit if we know that this callsite is guaranteed to block.
  - The ScopedBlockingCall's scope covers the entirety of the blocking operation
    previously asserted against by the AssertBlockingAllowed().

This CL was uploaded by git cl split.

R=sky@chromium.org

Bug: 874080
Change-Id: I8ca5da34968b9b94659c189b02e982f51399ab49
Reviewed-on: https://chromium-review.googlesource.com/1191799Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593237}
parent e4e2bb3a
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "base/json/json_string_value_serializer.h" #include "base/json/json_string_value_serializer.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "components/bookmarks/browser/bookmark_codec.h" #include "components/bookmarks/browser/bookmark_codec.h"
#include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_model.h"
...@@ -59,7 +58,6 @@ void AddBookmarksToIndex(BookmarkLoadDetails* details, ...@@ -59,7 +58,6 @@ void AddBookmarksToIndex(BookmarkLoadDetails* details,
} // namespace } // namespace
void LoadBookmarks(const base::FilePath& path, BookmarkLoadDetails* details) { void LoadBookmarks(const base::FilePath& path, BookmarkLoadDetails* details) {
base::AssertBlockingAllowed();
bool load_index = false; bool load_index = false;
bool bookmark_file_exists = base::PathExists(path); bool bookmark_file_exists = base::PathExists(path);
if (bookmark_file_exists) { if (bookmark_file_exists) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment