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

Side by Side Diff: chromeos/dbus/ibus/ibus_object.cc

Issue 16966003: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chromeos/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/debug_daemon_client.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 "chromeos/dbus/ibus/ibus_object.h" 5 #include "chromeos/dbus/ibus/ibus_object.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/dbus/ibus/ibus_property.h" 9 #include "chromeos/dbus/ibus/ibus_property.h"
10 #include "chromeos/dbus/ibus/ibus_text.h" 10 #include "chromeos/dbus/ibus/ibus_text.h"
11 #include "dbus/message.h" 11 #include "dbus/message.h"
12 #include "dbus/values_util.h" 12 #include "dbus/values_util.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 /////////////////////////////////////////////////////////////////////////////// 16 ///////////////////////////////////////////////////////////////////////////////
17 // IBusObjectReader 17 // IBusObjectReader
18 IBusObjectReader::IBusObjectReader(const std::string& type_name, 18 IBusObjectReader::IBusObjectReader(const std::string& type_name,
19 dbus::MessageReader* reader) 19 dbus::MessageReader* reader)
20 : type_name_(type_name), 20 : type_name_(type_name),
21 original_reader_(reader), 21 original_reader_(reader),
22 top_variant_reader_(NULL), 22 check_result_(IBUS_OBJECT_NOT_CHECKED) {}
23 contents_reader_(NULL),
24 check_result_(IBUS_OBJECT_NOT_CHECKED) {
25 }
26 23
27 IBusObjectReader::~IBusObjectReader() { 24 IBusObjectReader::~IBusObjectReader() {
28 for (std::map<std::string, base::Value*>::iterator ite = attachments_.begin(); 25 for (std::map<std::string, base::Value*>::iterator ite = attachments_.begin();
29 ite != attachments_.end(); ++ite) 26 ite != attachments_.end(); ++ite)
30 delete ite->second; 27 delete ite->second;
31 } 28 }
32 29
33 bool IBusObjectReader::Init() { 30 bool IBusObjectReader::Init() {
34 DCHECK(original_reader_); 31 DCHECK(original_reader_);
35 DCHECK_EQ(IBUS_OBJECT_NOT_CHECKED, check_result_); 32 DCHECK_EQ(IBUS_OBJECT_NOT_CHECKED, check_result_);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 dbus::MessageWriter variant_writer(NULL); 333 dbus::MessageWriter variant_writer(NULL);
337 dict_writer.OpenVariant("v", &variant_writer); 334 dict_writer.OpenVariant("v", &variant_writer);
338 335
339 dbus::AppendBasicTypeValueDataAsVariant(&variant_writer, value); 336 dbus::AppendBasicTypeValueDataAsVariant(&variant_writer, value);
340 dict_writer.CloseContainer(&variant_writer); 337 dict_writer.CloseContainer(&variant_writer);
341 attachment_writer_->CloseContainer(&variant_writer); 338 attachment_writer_->CloseContainer(&variant_writer);
342 return true; 339 return true;
343 } 340 }
344 341
345 } // namespace chromeos 342 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/debug_daemon_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698