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

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

Issue 10831232: Fix wrong DCHECK for handler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 | « no previous file | 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_engine_factory_service.h" 5 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 23 matching lines...) Expand all
34 34
35 virtual ~IBusEngineFactoryServiceImpl() { 35 virtual ~IBusEngineFactoryServiceImpl() {
36 bus_->UnregisterExportedObject(dbus::ObjectPath( 36 bus_->UnregisterExportedObject(dbus::ObjectPath(
37 ibus::engine_factory::kServicePath)); 37 ibus::engine_factory::kServicePath));
38 } 38 }
39 39
40 // IBusEngineFactoryService override. 40 // IBusEngineFactoryService override.
41 virtual void SetCreateEngineHandler( 41 virtual void SetCreateEngineHandler(
42 const std::string& engine_id, 42 const std::string& engine_id,
43 const CreateEngineHandler& create_engine_handler) OVERRIDE { 43 const CreateEngineHandler& create_engine_handler) OVERRIDE {
44 DCHECK(!create_engine_callback_map_[engine_id].is_null()); 44 DCHECK(create_engine_callback_map_[engine_id].is_null());
45 create_engine_callback_map_[engine_id] = create_engine_handler; 45 create_engine_callback_map_[engine_id] = create_engine_handler;
46 } 46 }
47 47
48 // IBusEngineFactoryService override. 48 // IBusEngineFactoryService override.
49 virtual void UnsetCreateEngineHandler( 49 virtual void UnsetCreateEngineHandler(
50 const std::string& engine_id) OVERRIDE { 50 const std::string& engine_id) OVERRIDE {
51 create_engine_callback_map_[engine_id].Reset(); 51 create_engine_callback_map_[engine_id].Reset();
52 } 52 }
53 53
54 private: 54 private:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 IBusEngineFactoryService* IBusEngineFactoryService::Create( 132 IBusEngineFactoryService* IBusEngineFactoryService::Create(
133 dbus::Bus* bus, 133 dbus::Bus* bus,
134 DBusClientImplementationType type) { 134 DBusClientImplementationType type) {
135 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 135 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
136 return new IBusEngineFactoryServiceImpl(bus); 136 return new IBusEngineFactoryServiceImpl(bus);
137 else 137 else
138 return new IBusEngineFactoryServiceStubImpl(); 138 return new IBusEngineFactoryServiceStubImpl();
139 } 139 }
140 140
141 } // namespace chromeos 141 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698