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

Unified Diff: components/invalidation/invalidation_service_util.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
Index: components/invalidation/invalidation_service_util.cc
diff --git a/components/invalidation/invalidation_service_util.cc b/components/invalidation/invalidation_service_util.cc
deleted file mode 100644
index 0049bca6fc583b77bfd4d013af3cd6d30419019f..0000000000000000000000000000000000000000
--- a/components/invalidation/invalidation_service_util.cc
+++ /dev/null
@@ -1,46 +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/invalidation_service_util.h"
-
-#include "base/base64.h"
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/rand_util.h"
-#include "components/invalidation/invalidation_switches.h"
-
-namespace invalidation {
-
-notifier::NotifierOptions ParseNotifierOptions(
- const base::CommandLine& command_line) {
- notifier::NotifierOptions notifier_options;
-
- if (command_line.HasSwitch(switches::kSyncNotificationHostPort)) {
- notifier_options.xmpp_host_port =
- net::HostPortPair::FromString(
- command_line.GetSwitchValueASCII(
- switches::kSyncNotificationHostPort));
- DVLOG(1) << "Using " << notifier_options.xmpp_host_port.ToString()
- << " for test sync notification server.";
- }
-
- notifier_options.allow_insecure_connection =
- command_line.HasSwitch(switches::kSyncAllowInsecureXmppConnection);
- DVLOG_IF(1, notifier_options.allow_insecure_connection)
- << "Allowing insecure XMPP connections.";
-
- return notifier_options;
-}
-
-std::string GenerateInvalidatorClientId() {
- // Generate a GUID with 128 bits worth of base64-encoded randomness.
- // This format is similar to that of sync's cache_guid.
- const int kGuidBytes = 128 / 8;
- std::string guid;
- base::Base64Encode(base::RandBytesAsString(kGuidBytes), &guid);
- DCHECK(!guid.empty());
- return guid;
-}
-
-} // namespace invalidation
« no previous file with comments | « components/invalidation/invalidation_service_util.h ('k') | components/invalidation/invalidation_state_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698