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

Unified Diff: ui/base/ime/win/imm32_manager.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 | « ui/base/ime/linux/linux_input_method_context_factory.h ('k') | ui/base/l10n/formatter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/win/imm32_manager.cc
diff --git a/ui/base/ime/win/imm32_manager.cc b/ui/base/ime/win/imm32_manager.cc
index 9f03a2a8651e11d4a50b82a86f99648ee9ce4bee..20bf93741e5e2474c1657cdaf5078aaafe56fbf1 100644
--- a/ui/base/ime/win/imm32_manager.cc
+++ b/ui/base/ime/win/imm32_manager.cc
@@ -6,8 +6,9 @@
#include <stdint.h>
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -41,7 +42,7 @@ void GetCompositionTargetRange(HIMC imm_context, int* target_start,
if (attribute_size > 0) {
int start = 0;
int end = 0;
- scoped_ptr<char[]> attribute_data(new char[attribute_size]);
+ std::unique_ptr<char[]> attribute_data(new char[attribute_size]);
if (attribute_data.get()) {
::ImmGetCompositionString(imm_context, GCS_COMPATTR,
attribute_data.get(), attribute_size);
@@ -69,7 +70,7 @@ void GetCompositionUnderlines(HIMC imm_context,
NULL, 0);
int clause_length = clause_size / sizeof(uint32_t);
if (clause_length) {
- scoped_ptr<uint32_t[]> clause_data(new uint32_t[clause_length]);
+ std::unique_ptr<uint32_t[]> clause_data(new uint32_t[clause_length]);
if (clause_data.get()) {
::ImmGetCompositionString(imm_context, GCS_COMPCLAUSE,
clause_data.get(), clause_size);
@@ -529,7 +530,7 @@ bool IMM32Manager::IsRTLKeyboardLayoutInstalled() {
// Retrieve the keyboard layouts in an array and check if there is an RTL
// layout in it.
- scoped_ptr<HKL[]> layouts(new HKL[size]);
+ std::unique_ptr<HKL[]> layouts(new HKL[size]);
::GetKeyboardLayoutList(size, layouts.get());
for (int i = 0; i < size; ++i) {
if (IsRTLPrimaryLangID(
« no previous file with comments | « ui/base/ime/linux/linux_input_method_context_factory.h ('k') | ui/base/l10n/formatter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698