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

Side by Side Diff: chrome/service/cloud_print/cloud_print_proxy_backend.h

Issue 8491048: Fixed crash in the proxy. Reference has been passed between threads, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 // CloudPrintProxyFrontend is the interface used by CloudPrintProxyBackend to 25 // CloudPrintProxyFrontend is the interface used by CloudPrintProxyBackend to
26 // communicate with the entity that created it and, presumably, is interested in 26 // communicate with the entity that created it and, presumably, is interested in
27 // cloud print proxy related activity. 27 // cloud print proxy related activity.
28 // NOTE: All methods will be invoked by a CloudPrintProxyBackend on the same 28 // NOTE: All methods will be invoked by a CloudPrintProxyBackend on the same
29 // thread used to create that CloudPrintProxyBackend. 29 // thread used to create that CloudPrintProxyBackend.
30 class CloudPrintProxyFrontend { 30 class CloudPrintProxyFrontend {
31 public: 31 public:
32 CloudPrintProxyFrontend() {} 32 CloudPrintProxyFrontend() {}
33 33
34 // There is a list of printers available that can be registered.
35 virtual void OnPrinterListAvailable(
36 const printing::PrinterList& printer_list) = 0;
37 // We successfully authenticated with the cloud print server. This callback 34 // We successfully authenticated with the cloud print server. This callback
38 // allows the frontend to persist the tokens. 35 // allows the frontend to persist the tokens.
39 virtual void OnAuthenticated(const std::string& robot_oauth_refresh_token, 36 virtual void OnAuthenticated(const std::string& robot_oauth_refresh_token,
40 const std::string& robot_email, 37 const std::string& robot_email,
41 const std::string& user_email) = 0; 38 const std::string& user_email) = 0;
42 // We have invalid/expired credentials. 39 // We have invalid/expired credentials.
43 virtual void OnAuthenticationFailed() = 0; 40 virtual void OnAuthenticationFailed() = 0;
44 // The print system could not be initialized. 41 // The print system could not be initialized.
45 virtual void OnPrintSystemUnavailable() = 0; 42 virtual void OnPrintSystemUnavailable() = 0;
46 43
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 MessageLoop* const frontend_loop_; 100 MessageLoop* const frontend_loop_;
104 // The frontend which is responsible for displaying UI and updating Prefs 101 // The frontend which is responsible for displaying UI and updating Prefs
105 CloudPrintProxyFrontend* frontend_; 102 CloudPrintProxyFrontend* frontend_;
106 103
107 friend class base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>; 104 friend class base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>;
108 105
109 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyBackend); 106 DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyBackend);
110 }; 107 };
111 108
112 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_ 109 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_PROXY_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | chrome/service/cloud_print/cloud_print_proxy_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698