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

Unified Diff: components/copresence/copresence_manager.cc

Issue 671573003: Adding support for authenticated copresence calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing memory error Created 6 years, 2 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 | « components/copresence/BUILD.gn ('k') | components/copresence/copresence_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/copresence_manager.cc
diff --git a/components/copresence/copresence_manager.cc b/components/copresence/copresence_manager.cc
deleted file mode 100644
index 3a4e73c9c9547f8d6a7dad4ef0b04528b07c09cc..0000000000000000000000000000000000000000
--- a/components/copresence/copresence_manager.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 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 "components/copresence/public/copresence_manager.h"
-
-#include "base/bind.h"
-#include "components/copresence/copresence_manager_impl.h"
-#include "components/copresence/rpc/rpc_handler.h"
-
-namespace copresence {
-
-// static
-scoped_ptr<CopresenceManager> CopresenceManager::Create(
- CopresenceDelegate* delegate) {
- CopresenceManagerImpl* manager = new CopresenceManagerImpl(delegate);
-
- manager->pending_init_operations_++;
- manager->rpc_handler_.reset(new RpcHandler(delegate));
- manager->rpc_handler_->Initialize(
- base::Bind(&CopresenceManagerImpl::InitStepComplete,
- // This is safe because the manager owns the RpcHandler.
- base::Unretained(manager),
- "Copresence device registration"));
-
- // This callback will be canceled on manager's destruction, hence unretained
- // is safe to use here.
- manager->init_callback_.Reset(
- base::Bind(&CopresenceManagerImpl::InitStepComplete,
- base::Unretained(manager),
- "Whispernet proxy initialization"));
-
- manager->pending_init_operations_++;
- DCHECK(delegate->GetWhispernetClient());
- delegate->GetWhispernetClient()->Initialize(
- manager->init_callback_.callback());
-
- return make_scoped_ptr<CopresenceManager>(manager);
-}
-
-} // namespace copresence
-
« no previous file with comments | « components/copresence/BUILD.gn ('k') | components/copresence/copresence_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698