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

Unified Diff: content/browser/renderer_host/sandbox_ipc_linux.cc

Issue 1711483004: Replace use of SkTDArray with std::vector in font code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/sandbox_ipc_linux.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/sandbox_ipc_linux.cc
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.cc b/content/browser/renderer_host/sandbox_ipc_linux.cc
index 465ddbdc2858ee2fb2bbb463f3d89671e3fc49ce..8fb50d4738fdef1bfd5406c0c124e019a5a3376b 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.cc
+++ b/content/browser/renderer_host/sandbox_ipc_linux.cc
@@ -167,12 +167,12 @@ void SandboxIPCHandler::HandleRequestFromRenderer(int fd) {
}
int SandboxIPCHandler::FindOrAddPath(const SkString& path) {
- int count = paths_.count();
+ int count = paths_.size();
for (int i = 0; i < count; ++i) {
- if (path == *paths_[i])
+ if (path == paths_[i])
return i;
}
- *paths_.append() = new SkString(path);
+ paths_.emplace_back(path);
return count;
}
@@ -221,9 +221,9 @@ void SandboxIPCHandler::HandleFontOpenRequest(
uint32_t index;
if (!iter.ReadUInt32(&index))
return;
- if (index >= static_cast<uint32_t>(paths_.count()))
+ if (index >= static_cast<uint32_t>(paths_.size()))
return;
- const int result_fd = open(paths_[index]->c_str(), O_RDONLY);
+ const int result_fd = open(paths_[index].c_str(), O_RDONLY);
base::Pickle reply;
if (result_fd == -1) {
@@ -434,7 +434,6 @@ void SandboxIPCHandler::SendRendererReply(
}
SandboxIPCHandler::~SandboxIPCHandler() {
- paths_.deleteAll();
if (blink_platform_impl_)
blink::shutdownWithoutV8();
« no previous file with comments | « content/browser/renderer_host/sandbox_ipc_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698