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

Side by Side Diff: chrome/browser/service/service_process_control.h

Issue 8620001: Cleanup pass from Cloud Print Proxy policy implementation. (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_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ 5 #ifndef CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_
6 #define CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ 6 #define CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 typedef IDMap<ServiceProcessControl>::iterator iterator; 44 typedef IDMap<ServiceProcessControl>::iterator iterator;
45 typedef std::queue<IPC::Message> MessageQueue; 45 typedef std::queue<IPC::Message> MessageQueue;
46 typedef base::Callback<void(const cloud_print::CloudPrintProxyInfo&)> 46 typedef base::Callback<void(const cloud_print::CloudPrintProxyInfo&)>
47 CloudPrintProxyInfoHandler; 47 CloudPrintProxyInfoHandler;
48 48
49 // Returns the singleton instance of this class. 49 // Returns the singleton instance of this class.
50 static ServiceProcessControl* GetInstance(); 50 static ServiceProcessControl* GetInstance();
51 51
52 // Return true if this object is connected to the service. 52 // Return true if this object is connected to the service.
53 // Virtual for testing. 53 // Virtual for testing.
54 virtual bool is_connected() const; 54 virtual bool IsConnected() const;
55 55
56 // If no service process is currently running, creates a new service process 56 // If no service process is currently running, creates a new service process
57 // and connects to it. If a service process is already running this method 57 // and connects to it. If a service process is already running this method
58 // will try to connect to it. 58 // will try to connect to it.
59 // |success_task| is called when we have successfully launched the process 59 // |success_task| is called when we have successfully launched the process
60 // and connected to it. 60 // and connected to it.
61 // |failure_task| is called when we failed to connect to the service process. 61 // |failure_task| is called when we failed to connect to the service process.
62 // It is OK to pass the same value for |success_task| and |failure_task|. In 62 // It is OK to pass the same value for |success_task| and |failure_task|. In
63 // this case, the task is invoked on success or failure. 63 // this case, the task is invoked on success or failure.
64 // Note that if we are already connected to service process then 64 // Note that if we are already connected to service process then
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 TaskList connect_failure_tasks_; 161 TaskList connect_failure_tasks_;
162 162
163 // Callback that gets invoked when a status message is received from 163 // Callback that gets invoked when a status message is received from
164 // the cloud print proxy. 164 // the cloud print proxy.
165 CloudPrintProxyInfoHandler cloud_print_info_callback_; 165 CloudPrintProxyInfoHandler cloud_print_info_callback_;
166 166
167 content::NotificationRegistrar registrar_; 167 content::NotificationRegistrar registrar_;
168 }; 168 };
169 169
170 #endif // CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ 170 #endif // CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698