| 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/ui/sync/one_click_signin_sync_observer.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_sync_observer.h" |
| 6 | 6 |
| 7 #include <string> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/location.h" | 10 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/signin/signin_promo.h" | 14 #include "chrome/browser/signin/signin_promo.h" |
| 13 #include "chrome/browser/sync/profile_sync_service_factory.h" | 15 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 14 #include "components/browser_sync/profile_sync_service.h" | 16 #include "components/browser_sync/profile_sync_service.h" |
| 15 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 16 #include "content/public/browser/web_contents_delegate.h" | 18 #include "content/public/browser/web_contents_delegate.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 109 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 108 return ProfileSyncServiceFactory::GetForProfile(profile); | 110 return ProfileSyncServiceFactory::GetForProfile(profile); |
| 109 } | 111 } |
| 110 | 112 |
| 111 // static | 113 // static |
| 112 void OneClickSigninSyncObserver::DeleteObserver( | 114 void OneClickSigninSyncObserver::DeleteObserver( |
| 113 base::WeakPtr<OneClickSigninSyncObserver> observer) { | 115 base::WeakPtr<OneClickSigninSyncObserver> observer) { |
| 114 if (observer) | 116 if (observer) |
| 115 delete observer.get(); | 117 delete observer.get(); |
| 116 } | 118 } |
| OLD | NEW |