| OLD | NEW |
| 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 #include "chrome/browser/apps/drive/drive_service_bridge.h" | 5 #include "chrome/browser/apps/drive/drive_service_bridge.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/drive/drive_api_service.h" | 10 #include "chrome/browser/drive/drive_api_service.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class DriveServiceBridgeImpl : public DriveServiceBridge, | 26 class DriveServiceBridgeImpl : public DriveServiceBridge, |
| 27 public drive::DriveServiceObserver, | 27 public drive::DriveServiceObserver, |
| 28 public drive::DriveNotificationObserver { | 28 public drive::DriveNotificationObserver { |
| 29 public: | 29 public: |
| 30 explicit DriveServiceBridgeImpl(Profile* profile); | 30 explicit DriveServiceBridgeImpl(Profile* profile); |
| 31 virtual ~DriveServiceBridgeImpl(); | 31 virtual ~DriveServiceBridgeImpl(); |
| 32 | 32 |
| 33 void Initialize(); | 33 void Initialize(); |
| 34 | 34 |
| 35 // DriveServiceBridge: | 35 // DriveServiceBridge: |
| 36 virtual drive::DriveAppRegistry* GetAppRegistry() OVERRIDE; | 36 virtual drive::DriveAppRegistry* GetAppRegistry() override; |
| 37 | 37 |
| 38 // drive::DriveServiceObserver: | 38 // drive::DriveServiceObserver: |
| 39 virtual void OnReadyToSendRequests() OVERRIDE; | 39 virtual void OnReadyToSendRequests() override; |
| 40 | 40 |
| 41 // drive::DriveNotificationObserver: | 41 // drive::DriveNotificationObserver: |
| 42 virtual void OnNotificationReceived() OVERRIDE; | 42 virtual void OnNotificationReceived() override; |
| 43 virtual void OnPushNotificationEnabled(bool enabled) OVERRIDE; | 43 virtual void OnPushNotificationEnabled(bool enabled) override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 Profile* profile_; | 46 Profile* profile_; |
| 47 scoped_ptr<drive::DriveServiceInterface> drive_service_; | 47 scoped_ptr<drive::DriveServiceInterface> drive_service_; |
| 48 scoped_ptr<drive::DriveAppRegistry> drive_app_registry_; | 48 scoped_ptr<drive::DriveAppRegistry> drive_app_registry_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(DriveServiceBridgeImpl); | 50 DISALLOW_COPY_AND_ASSIGN(DriveServiceBridgeImpl); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 DriveServiceBridgeImpl::DriveServiceBridgeImpl(Profile* profile) | 53 DriveServiceBridgeImpl::DriveServiceBridgeImpl(Profile* profile) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 | 130 |
| 131 // static | 131 // static |
| 132 void DriveServiceBridge::AppendDependsOnFactories( | 132 void DriveServiceBridge::AppendDependsOnFactories( |
| 133 std::set<BrowserContextKeyedServiceFactory*>* factories) { | 133 std::set<BrowserContextKeyedServiceFactory*>* factories) { |
| 134 DCHECK(factories); | 134 DCHECK(factories); |
| 135 factories->insert(ProfileOAuth2TokenServiceFactory::GetInstance()); | 135 factories->insert(ProfileOAuth2TokenServiceFactory::GetInstance()); |
| 136 factories->insert(SigninManagerFactory::GetInstance()); | 136 factories->insert(SigninManagerFactory::GetInstance()); |
| 137 factories->insert(drive::DriveNotificationManagerFactory::GetInstance()); | 137 factories->insert(drive::DriveNotificationManagerFactory::GetInstance()); |
| 138 } | 138 } |
| OLD | NEW |