Commit 9318244f authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Chromium LUCI CQ

[ios] Stop using global static std::string objects

Using global static non-POD object is against the style guide when
they have a destructor (which std::string does) as the destructors
are called in an order that is not controllable and they can cause
issue during shutdown.

Bug: none
Change-Id: I8967d86d029004bc66912ae6b28f2be59633dd08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2640535
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarDavid Jean <djean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846067}
parent 7e938870
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
BROWSER_USER_DATA_KEY_IMPL(SessionRestorationBrowserAgent) BROWSER_USER_DATA_KEY_IMPL(SessionRestorationBrowserAgent)
namespace { namespace {
const std::string kSessionDirectory = "Sessions"; const base::FilePath::CharType kSessionDirectory[] =
FILE_PATH_LITERAL("Sessions");
} }
// static // static
......
...@@ -20,9 +20,12 @@ ...@@ -20,9 +20,12 @@
namespace { namespace {
const std::string kLegacyBaseDirectory = "Chromium"; const base::FilePath::CharType kLegacyBaseDirectory[] =
const std::string kSessionsDirectory = "Sessions"; FILE_PATH_LITERAL("Chromium");
const std::string kSnapshotsDirectory = "Snapshots"; const base::FilePath::CharType kSessionsDirectory[] =
FILE_PATH_LITERAL("Sessions");
const base::FilePath::CharType kSnapshotsDirectory[] =
FILE_PATH_LITERAL("Snapshots");
} // namespace } // namespace
......
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