| 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/browser/chrome_to_mobile_service.h" | 5 #include "chrome/browser/chrome_to_mobile_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| 11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
| 12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "chrome/app/chrome_command_ids.h" | 16 #include "chrome/app/chrome_command_ids.h" |
| 17 #include "chrome/browser/chrome_to_mobile_service_factory.h" | 17 #include "chrome/browser/chrome_to_mobile_service_factory.h" |
| 18 #include "chrome/browser/prefs/pref_registry_syncable.h" | |
| 19 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" | 18 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/browser/signin/token_service.h" | 20 #include "chrome/browser/signin/token_service.h" |
| 22 #include "chrome/browser/signin/token_service_factory.h" | 21 #include "chrome/browser/signin/token_service_factory.h" |
| 23 #include "chrome/browser/sync/profile_sync_service.h" | 22 #include "chrome/browser/sync/profile_sync_service.h" |
| 24 #include "chrome/browser/sync/profile_sync_service_factory.h" | 23 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 25 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
| 26 #include "chrome/browser/ui/browser_command_controller.h" | 25 #include "chrome/browser/ui/browser_command_controller.h" |
| 27 #include "chrome/browser/ui/browser_finder.h" | 26 #include "chrome/browser/ui/browser_finder.h" |
| 28 #include "chrome/browser/ui/browser_navigator.h" | 27 #include "chrome/browser/ui/browser_navigator.h" |
| 29 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 28 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 30 #include "chrome/common/chrome_notification_types.h" | 29 #include "chrome/common/chrome_notification_types.h" |
| 31 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 32 #include "chrome/common/cloud_print/cloud_print_constants.h" | 31 #include "chrome/common/cloud_print/cloud_print_constants.h" |
| 33 #include "chrome/common/cloud_print/cloud_print_helpers.h" | 32 #include "chrome/common/cloud_print/cloud_print_helpers.h" |
| 34 #include "chrome/common/extensions/feature_switch.h" | 33 #include "chrome/common/extensions/feature_switch.h" |
| 35 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
| 36 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
| 36 #include "components/user_prefs/pref_registry_syncable.h" |
| 37 #include "content/public/browser/browser_thread.h" | 37 #include "content/public/browser/browser_thread.h" |
| 38 #include "content/public/browser/notification_details.h" | 38 #include "content/public/browser/notification_details.h" |
| 39 #include "content/public/browser/notification_source.h" | 39 #include "content/public/browser/notification_source.h" |
| 40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
| 41 #include "google/cacheinvalidation/include/types.h" | 41 #include "google/cacheinvalidation/include/types.h" |
| 42 #include "google/cacheinvalidation/types.pb.h" | 42 #include "google/cacheinvalidation/types.pb.h" |
| 43 #include "google_apis/gaia/gaia_constants.h" | 43 #include "google_apis/gaia/gaia_constants.h" |
| 44 #include "google_apis/gaia/gaia_urls.h" | 44 #include "google_apis/gaia/gaia_urls.h" |
| 45 #include "google_apis/gaia/oauth2_access_token_fetcher.h" | 45 #include "google_apis/gaia/oauth2_access_token_fetcher.h" |
| 46 #include "net/base/escape.h" | 46 #include "net/base/escape.h" |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 | 743 |
| 744 // Report failure below and ignore the second response. | 744 // Report failure below and ignore the second response. |
| 745 request_observer_map_.erase(other); | 745 request_observer_map_.erase(other); |
| 746 break; | 746 break; |
| 747 } | 747 } |
| 748 } | 748 } |
| 749 | 749 |
| 750 if (observer.get()) | 750 if (observer.get()) |
| 751 observer->OnSendComplete(success); | 751 observer->OnSendComplete(success); |
| 752 } | 752 } |
| OLD | NEW |