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

Side by Side Diff: extensions/utility/unpacker.cc

Issue 2899743002: Remove raw base::DictionaryValue::Set in //extensions (Closed)
Patch Set: Addressed nit Created 3 years, 6 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
« no previous file with comments | « extensions/common/message_bundle_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "extensions/utility/unpacker.h" 5 #include "extensions/utility/unpacker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (!extension_dir_.AppendRelativePath(message_path, &relative_path)) { 311 if (!extension_dir_.AppendRelativePath(message_path, &relative_path)) {
312 NOTREACHED(); 312 NOTREACHED();
313 return false; 313 return false;
314 } 314 }
315 315
316 std::string dir_name = relative_path.DirName().MaybeAsASCII(); 316 std::string dir_name = relative_path.DirName().MaybeAsASCII();
317 if (dir_name.empty()) { 317 if (dir_name.empty()) {
318 NOTREACHED(); 318 NOTREACHED();
319 return false; 319 return false;
320 } 320 }
321 parsed_catalogs_->Set(dir_name, root.release()); 321 parsed_catalogs_->Set(dir_name, std::move(root));
322 322
323 return true; 323 return true;
324 } 324 }
325 325
326 void Unpacker::SetError(const std::string& error) { 326 void Unpacker::SetError(const std::string& error) {
327 SetUTF16Error(base::UTF8ToUTF16(error)); 327 SetUTF16Error(base::UTF8ToUTF16(error));
328 } 328 }
329 329
330 void Unpacker::SetUTF16Error(const base::string16& error) { 330 void Unpacker::SetUTF16Error(const base::string16& error) {
331 error_message_ = error; 331 error_message_ = error;
332 } 332 }
333 333
334 } // namespace extensions 334 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/message_bundle_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698