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

Side by Side Diff: components/copresence/public/copresence_delegate.h

Issue 901213003: Removing the project ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « components/copresence/proto/data.proto ('k') | components/copresence/rpc/rpc_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ 5 #ifndef COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_
6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ 6 #define COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 29 matching lines...) Expand all
40 const std::string& subscription_id, 40 const std::string& subscription_id,
41 const std::vector<Message>& messages) = 0; 41 const std::vector<Message>& messages) = 0;
42 42
43 virtual void HandleStatusUpdate(CopresenceStatus status) = 0; 43 virtual void HandleStatusUpdate(CopresenceStatus status) = 0;
44 44
45 // Thw URLRequestContextGetter must outlive the CopresenceManager. 45 // Thw URLRequestContextGetter must outlive the CopresenceManager.
46 virtual net::URLRequestContextGetter* GetRequestContext() const = 0; 46 virtual net::URLRequestContextGetter* GetRequestContext() const = 0;
47 47
48 virtual const std::string GetPlatformVersionString() const = 0; 48 virtual const std::string GetPlatformVersionString() const = 0;
49 49
50 // This is deprecated. Clients should pass in the project ID instead.
51 virtual const std::string GetAPIKey(const std::string& app_id) const = 0; 50 virtual const std::string GetAPIKey(const std::string& app_id) const = 0;
52 51
53 virtual const std::string GetProjectId(const std::string& app_id) const = 0;
54
55 // Thw WhispernetClient must outlive the CopresenceManager. 52 // Thw WhispernetClient must outlive the CopresenceManager.
56 virtual WhispernetClient* GetWhispernetClient() = 0; 53 virtual WhispernetClient* GetWhispernetClient() = 0;
57 54
58 // Clients may optionally provide a GCMDriver to receive messages from. 55 // Clients may optionally provide a GCMDriver to receive messages from.
59 // If no driver is available, this can return null. 56 // If no driver is available, this can return null.
60 virtual gcm::GCMDriver* GetGCMDriver() = 0; 57 virtual gcm::GCMDriver* GetGCMDriver() = 0;
61 58
62 // Get the copresence device ID for authenticated or anonymous calls, 59 // Get the copresence device ID for authenticated or anonymous calls,
63 // as specified. If none exists, return the empty string. 60 // as specified. If none exists, return the empty string.
64 virtual const std::string GetDeviceId(bool authenticated) = 0; 61 virtual const std::string GetDeviceId(bool authenticated) = 0;
65 62
66 // Save a copresence device ID for authenticated or anonymous calls. 63 // Save a copresence device ID for authenticated or anonymous calls.
67 // If the device ID is empty, any stored ID should be deleted. 64 // If the device ID is empty, any stored ID should be deleted.
68 virtual void SaveDeviceId(bool authenticated, 65 virtual void SaveDeviceId(bool authenticated,
69 const std::string& device_id) = 0; 66 const std::string& device_id) = 0;
70 67
71 protected: 68 protected:
72 virtual ~CopresenceDelegate() {} 69 virtual ~CopresenceDelegate() {}
73 }; 70 };
74 71
75 } // namespace copresence 72 } // namespace copresence
76 73
77 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_ 74 #endif // COMPONENTS_COPRESENCE_PUBLIC_COPRESENCE_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/copresence/proto/data.proto ('k') | components/copresence/rpc/rpc_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698