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

Unified Diff: chrome/browser/extensions/api/push_messaging/sync_setup_helper.h

Issue 1018643003: Removing chrome.pushMessaging API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates to documentation per kalman's comments Created 5 years, 9 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: chrome/browser/extensions/api/push_messaging/sync_setup_helper.h
diff --git a/chrome/browser/extensions/api/push_messaging/sync_setup_helper.h b/chrome/browser/extensions/api/push_messaging/sync_setup_helper.h
deleted file mode 100644
index e31accf46d598dbfc4cd9f9f0e1fee659952826d..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/push_messaging/sync_setup_helper.h
+++ /dev/null
@@ -1,82 +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.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_SYNC_SETUP_HELPER_H_
-#define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_SYNC_SETUP_HELPER_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "net/dns/mock_host_resolver.h"
-
-class Profile;
-class ProfileSyncServiceHarness;
-
-namespace base {
-class FilePath;
-}
-
-namespace extensions {
-
-class SyncSetupHelper {
- public:
- SyncSetupHelper();
-
- ~SyncSetupHelper();
-
- // Performs one-time initialization to enable sync for a profile. Does nothing
- // if sync is already enabled for the profile.
- bool InitializeSync(Profile* profile);
-
- // Helper method used to read GAIA credentials from a local password file.
- // Note: The password file must be a plain text file with two lines.
- // The username is on the first line and the password is on the second line.
- bool ReadPasswordFile(const base::FilePath& passwordFile);
-
- const std::string& client_id() const { return client_id_; }
- const std::string& client_secret() const { return client_secret_; }
- const std::string& refresh_token() const { return refresh_token_; }
-
- private:
- // Block until all sync clients have completed their mutual sync cycles.
- // Return true if a quiescent state was successfully reached.
- bool AwaitQuiescence();
-
- // GAIA account used by the test case.
- std::string username_;
-
- // GAIA password used by the test case.
- std::string password_;
-
- // GAIA client id for making the API call to push messaging.
- std::string client_id_;
-
- // GAIA client secret for making the API call to push messaging.
- std::string client_secret_;
-
- // GAIA refresh token for making the API call to push messaging.
- std::string refresh_token_;
-
- // The sync profile used by a test. The profile is owned by the
- // ProfileManager.
- Profile* profile_;
-
- // Sync client used by a test. A sync client is associated with
- // a sync profile, and implements methods that sync the contents of the
- // profile with the server.
- scoped_ptr<ProfileSyncServiceHarness> client_;
-
- // This test needs to make live DNS requests for access to
- // GAIA and sync server URLs under google.com. We use a scoped version
- // to override the default resolver while the test is active.
- scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncSetupHelper);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_SYNC_SETUP_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698