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

Unified Diff: chromeos/dbus/ibus/mock_ibus_engine_factory_service.cc

Issue 68603002: Delete IBusEngineFactoryService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 1 month 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 | « chromeos/dbus/ibus/mock_ibus_engine_factory_service.h ('k') | chromeos/ime/ibus_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/ibus/mock_ibus_engine_factory_service.cc
diff --git a/chromeos/dbus/ibus/mock_ibus_engine_factory_service.cc b/chromeos/dbus/ibus/mock_ibus_engine_factory_service.cc
deleted file mode 100644
index b419118db42f44a0dcf1351f5ee6ddfca7968bda..0000000000000000000000000000000000000000
--- a/chromeos/dbus/ibus/mock_ibus_engine_factory_service.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chromeos/dbus/ibus/mock_ibus_engine_factory_service.h"
-
-#include "base/bind.h"
-
-namespace chromeos {
-
-MockIBusEngineFactoryService::MockIBusEngineFactoryService()
- : set_create_engine_handler_call_count_(0),
- unset_create_engine_handler_call_count_(0),
- weak_ptr_factory_(this) {
-}
-
-MockIBusEngineFactoryService::~MockIBusEngineFactoryService() {
-}
-
-void MockIBusEngineFactoryService::SetCreateEngineHandler(
- const std::string& engine_id,
- const CreateEngineHandler& create_engine_handler) {
- handler_map_[engine_id] = create_engine_handler;
- set_create_engine_handler_call_count_++;
-}
-
-void MockIBusEngineFactoryService::UnsetCreateEngineHandler(
- const std::string& engine_id) {
- unset_create_engine_handler_call_count_++;
- handler_map_[engine_id].Reset();
-}
-
-dbus::ObjectPath MockIBusEngineFactoryService::GenerateUniqueObjectPath() {
- return dbus::ObjectPath("/org/freedesktop/IBus/Engine/1");
-}
-
-bool MockIBusEngineFactoryService::CallCreateEngine(
- const std::string& engine_id) {
- if (handler_map_.find(engine_id) != handler_map_.end() &&
- !handler_map_[engine_id].is_null()) {
- handler_map_[engine_id].Run(
- base::Bind(&MockIBusEngineFactoryService::OnEngineCreated,
- weak_ptr_factory_.GetWeakPtr(),
- engine_id));
- return true;
- }
- return false;
-}
-
-dbus::ObjectPath MockIBusEngineFactoryService::GetObjectPathByEngineId(
- const std::string& engine_id) {
- if (object_path_map_.find(engine_id) != object_path_map_.end())
- return dbus::ObjectPath();
- return object_path_map_[engine_id];
-}
-
-void MockIBusEngineFactoryService::OnEngineCreated(
- const std::string& engine_id,
- const dbus::ObjectPath& path) {
- object_path_map_[engine_id] = path;
-}
-
-} // namespace chromeos
« no previous file with comments | « chromeos/dbus/ibus/mock_ibus_engine_factory_service.h ('k') | chromeos/ime/ibus_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698