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

Unified Diff: sync/test/accounts_client/test_accounts_client.h

Issue 1138113003: Remove Test Accounts service client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « sync/test/accounts_client/DEPS ('k') | sync/test/accounts_client/test_accounts_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/accounts_client/test_accounts_client.h
diff --git a/sync/test/accounts_client/test_accounts_client.h b/sync/test/accounts_client/test_accounts_client.h
deleted file mode 100644
index 15a582e7229380e430c44d5aa54a7d07554a2501..0000000000000000000000000000000000000000
--- a/sync/test/accounts_client/test_accounts_client.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2013 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.
-
-#ifndef SYNC_TEST_ACCOUNTS_CLIENT_TEST_ACCOUNTS_CLIENT_H_
-#define SYNC_TEST_ACCOUNTS_CLIENT_TEST_ACCOUNTS_CLIENT_H_
-
-#include <string>
-#include <vector>
-
-#include "base/message_loop/message_loop.h"
-#include "url/gurl.h"
-
-using std::string;
-using std::vector;
-
-// The data associated with an account session.
-struct AccountSession {
- AccountSession();
- ~AccountSession();
-
- string username;
- string account_space;
- string session_id;
- string expiration_time;
-};
-
-// A test-side client for the Test Accounts service. This service provides
-// short-term, exclusive access to test accounts for the purpose of testing
-// against real Chrome Sync servers.
-class TestAccountsClient {
- public:
- // Creates a client associated with the given |server| URL (e.g.,
- // http://service-runs-here.com), |account_space| (for account segregation),
- // and |usernames| (the collection of accounts to be chosen from).
- TestAccountsClient(const string& server,
- const string& account_space,
- const vector<string>& usernames);
-
- virtual ~TestAccountsClient();
-
- // Attempts to claim an account via the Test Accounts service. If
- // successful, true is returned and the given |session| has its data set.
- // If an error occurred, then false is returned.
- bool ClaimAccount(AccountSession* session);
-
- // Attempts to release an account via the Test Accounts service. The value
- // of |session| should be one returned from ClaimAccount(). This function
- // is best-effort and fails silently.
- void ReleaseAccount(const AccountSession& session);
-
- // Sends an HTTP POST request to the Test Accounts service.
- virtual bool SendRequest(const GURL& url, string* response);
-
- private:
- GURL CreateGURLWithPath(const string& path);
- base::MessageLoopForIO io_loop_;
- const string server_;
- const string account_space_;
- vector<string> usernames_;
-};
-
-#endif // SYNC_TEST_ACCOUNTS_CLIENT_TEST_ACCOUNTS_CLIENT_H_
« no previous file with comments | « sync/test/accounts_client/DEPS ('k') | sync/test/accounts_client/test_accounts_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698