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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_observer.cc

Issue 2345843003: [Sync] Merge //components/browser_sync into one directory. (Closed)
Patch Set: Address comment + rebase. Created 4 years, 3 months 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
OLDNEW
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/signin/signin_promo.h" 12 #include "chrome/browser/signin/signin_promo.h"
13 #include "chrome/browser/sync/profile_sync_service_factory.h" 13 #include "chrome/browser/sync/profile_sync_service_factory.h"
14 #include "components/browser_sync/browser/profile_sync_service.h" 14 #include "components/browser_sync/profile_sync_service.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "content/public/browser/web_contents_delegate.h" 16 #include "content/public/browser/web_contents_delegate.h"
17 17
18 namespace { 18 namespace {
19 19
20 void CloseTab(content::WebContents* tab) { 20 void CloseTab(content::WebContents* tab) {
21 content::WebContentsDelegate* tab_delegate = tab->GetDelegate(); 21 content::WebContentsDelegate* tab_delegate = tab->GetDelegate();
22 if (tab_delegate) 22 if (tab_delegate)
23 tab_delegate->CloseContents(tab); 23 tab_delegate->CloseContents(tab);
24 } 24 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 105 Profile::FromBrowserContext(web_contents->GetBrowserContext());
106 return ProfileSyncServiceFactory::GetForProfile(profile); 106 return ProfileSyncServiceFactory::GetForProfile(profile);
107 } 107 }
108 108
109 // static 109 // static
110 void OneClickSigninSyncObserver::DeleteObserver( 110 void OneClickSigninSyncObserver::DeleteObserver(
111 base::WeakPtr<OneClickSigninSyncObserver> observer) { 111 base::WeakPtr<OneClickSigninSyncObserver> observer) {
112 if (observer) 112 if (observer)
113 delete observer.get(); 113 delete observer.get();
114 } 114 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698