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

Unified Diff: components/invalidation/p2p_invalidation_service.cc

Issue 1191393008: Introduce a layering in the invalidation component as public and impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Explicitly forbid content to prevent future additions Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/invalidation/p2p_invalidation_service.h ('k') | components/invalidation/p2p_invalidator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/p2p_invalidation_service.cc
diff --git a/components/invalidation/p2p_invalidation_service.cc b/components/invalidation/p2p_invalidation_service.cc
deleted file mode 100644
index a528e9f07e38670b0a177b7c43a2fb788a8e9bee..0000000000000000000000000000000000000000
--- a/components/invalidation/p2p_invalidation_service.cc
+++ /dev/null
@@ -1,87 +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/invalidation/p2p_invalidation_service.h"
-
-#include "base/command_line.h"
-#include "components/invalidation/invalidation_service_util.h"
-#include "components/invalidation/p2p_invalidator.h"
-#include "google_apis/gaia/identity_provider.h"
-#include "jingle/notifier/base/notifier_options.h"
-#include "jingle/notifier/listener/push_client.h"
-#include "net/url_request/url_request_context_getter.h"
-
-namespace net {
-class URLRequestContextGetter;
-}
-
-namespace invalidation {
-
-P2PInvalidationService::P2PInvalidationService(
- scoped_ptr<IdentityProvider> identity_provider,
- const scoped_refptr<net::URLRequestContextGetter>& request_context,
- syncer::P2PNotificationTarget notification_target)
- : identity_provider_(identity_provider.Pass()) {
- notifier::NotifierOptions notifier_options =
- ParseNotifierOptions(*base::CommandLine::ForCurrentProcess());
- notifier_options.request_context_getter = request_context;
- invalidator_id_ = GenerateInvalidatorClientId();
- invalidator_.reset(new syncer::P2PInvalidator(
- notifier::PushClient::CreateDefault(notifier_options),
- invalidator_id_,
- notification_target));
-}
-
-P2PInvalidationService::~P2PInvalidationService() {
-}
-
-void P2PInvalidationService::UpdateCredentials(const std::string& username,
- const std::string& password) {
- invalidator_->UpdateCredentials(username, password);
-}
-
-void P2PInvalidationService::RegisterInvalidationHandler(
- syncer::InvalidationHandler* handler) {
- invalidator_->RegisterHandler(handler);
-}
-
-bool P2PInvalidationService::UpdateRegisteredInvalidationIds(
- syncer::InvalidationHandler* handler,
- const syncer::ObjectIdSet& ids) {
- return invalidator_->UpdateRegisteredIds(handler, ids);
-}
-
-void P2PInvalidationService::UnregisterInvalidationHandler(
- syncer::InvalidationHandler* handler) {
- invalidator_->UnregisterHandler(handler);
-}
-
-void P2PInvalidationService::SendInvalidation(
- const syncer::ObjectIdSet& ids) {
- invalidator_->SendInvalidation(ids);
-}
-
-syncer::InvalidatorState P2PInvalidationService::GetInvalidatorState() const {
- return invalidator_->GetInvalidatorState();
-}
-
-std::string P2PInvalidationService::GetInvalidatorClientId() const {
- return invalidator_id_;
-}
-
-InvalidationLogger* P2PInvalidationService::GetInvalidationLogger() {
- return NULL;
-}
-
-void P2PInvalidationService::RequestDetailedStatus(
- base::Callback<void(const base::DictionaryValue&)> caller) const {
- base::DictionaryValue value;
- caller.Run(value);
-}
-
-IdentityProvider* P2PInvalidationService::GetIdentityProvider() {
- return identity_provider_.get();
-}
-
-} // namespace invalidation
« no previous file with comments | « components/invalidation/p2p_invalidation_service.h ('k') | components/invalidation/p2p_invalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698