OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" | 5 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/rand_util.h" | 13 #include "base/rand_util.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/common/net/gaia/gaia_oauth_client.h" | |
16 #include "chrome/common/net/gaia/gaia_urls.h" | |
17 #include "chrome/service/cloud_print/cloud_print_auth.h" | 15 #include "chrome/service/cloud_print/cloud_print_auth.h" |
18 #include "chrome/service/cloud_print/cloud_print_connector.h" | 16 #include "chrome/service/cloud_print/cloud_print_connector.h" |
19 #include "chrome/service/cloud_print/cloud_print_consts.h" | 17 #include "chrome/service/cloud_print/cloud_print_consts.h" |
20 #include "chrome/service/cloud_print/cloud_print_helpers.h" | 18 #include "chrome/service/cloud_print/cloud_print_helpers.h" |
21 #include "chrome/service/cloud_print/cloud_print_token_store.h" | 19 #include "chrome/service/cloud_print/cloud_print_token_store.h" |
22 #include "chrome/service/gaia/service_gaia_authenticator.h" | 20 #include "chrome/service/gaia/service_gaia_authenticator.h" |
23 #include "chrome/service/net/service_url_request_context.h" | 21 #include "chrome/service/net/service_url_request_context.h" |
24 #include "chrome/service/service_process.h" | 22 #include "chrome/service/service_process.h" |
| 23 #include "google_apis/gaia/gaia_oauth_client.h" |
| 24 #include "google_apis/gaia/gaia_urls.h" |
25 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
27 #include "jingle/notifier/base/notifier_options.h" | 27 #include "jingle/notifier/base/notifier_options.h" |
28 #include "jingle/notifier/listener/push_client.h" | 28 #include "jingle/notifier/listener/push_client.h" |
29 #include "jingle/notifier/listener/push_client_observer.h" | 29 #include "jingle/notifier/listener/push_client_observer.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 | 31 |
32 // The real guts of CloudPrintProxyBackend, to keep the public client API clean. | 32 // The real guts of CloudPrintProxyBackend, to keep the public client API clean. |
33 class CloudPrintProxyBackend::Core | 33 class CloudPrintProxyBackend::Core |
34 : public base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>, | 34 : public base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>, |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 530 |
531 | 531 |
532 void CloudPrintProxyBackend::Core::OnIncomingNotification( | 532 void CloudPrintProxyBackend::Core::OnIncomingNotification( |
533 const notifier::Notification& notification) { | 533 const notifier::Notification& notification) { |
534 DCHECK(MessageLoop::current() == backend_->core_thread_.message_loop()); | 534 DCHECK(MessageLoop::current() == backend_->core_thread_.message_loop()); |
535 VLOG(1) << "CP_CONNECTOR: Incoming notification."; | 535 VLOG(1) << "CP_CONNECTOR: Incoming notification."; |
536 if (0 == base::strcasecmp(kCloudPrintPushNotificationsSource, | 536 if (0 == base::strcasecmp(kCloudPrintPushNotificationsSource, |
537 notification.channel.c_str())) | 537 notification.channel.c_str())) |
538 HandlePrinterNotification(notification.data); | 538 HandlePrinterNotification(notification.data); |
539 } | 539 } |
OLD | NEW |