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

Side by Side Diff: chrome/browser/ui/android/tab_model/tab_model.cc

Issue 2354613002: [Sync] Fix namespaces for the browser_sync component. (Closed)
Patch Set: Address comments. Created 4 years, 2 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 (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/ui/android/tab_model/tab_model.h" 5 #include "chrome/browser/ui/android/tab_model/tab_model.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 content::WebContents* TabModel::GetActiveWebContents() const { 75 content::WebContents* TabModel::GetActiveWebContents() const {
76 int active_index = GetActiveIndex(); 76 int active_index = GetActiveIndex();
77 if (active_index == INVALID_TAB_INDEX) 77 if (active_index == INVALID_TAB_INDEX)
78 return nullptr; 78 return nullptr;
79 return GetWebContentsAt(active_index); 79 return GetWebContentsAt(active_index);
80 } 80 }
81 81
82 void TabModel::BroadcastSessionRestoreComplete() { 82 void TabModel::BroadcastSessionRestoreComplete() {
83 if (profile_) { 83 if (profile_) {
84 ProfileSyncService* sync_service = 84 browser_sync::ProfileSyncService* sync_service =
85 ProfileSyncServiceFactory::GetForProfile(profile_); 85 ProfileSyncServiceFactory::GetForProfile(profile_);
86 if (sync_service) 86 if (sync_service)
87 sync_service->OnSessionRestoreComplete(); 87 sync_service->OnSessionRestoreComplete();
88 } else { 88 } else {
89 // TODO(nyquist): Uncomment this once downstream Android uses new 89 // TODO(nyquist): Uncomment this once downstream Android uses new
90 // constructor that takes a Profile* argument. See crbug.com/159704. 90 // constructor that takes a Profile* argument. See crbug.com/159704.
91 // NOTREACHED(); 91 // NOTREACHED();
92 } 92 }
93 } 93 }
94 94
(...skipping 14 matching lines...) Expand all
109 if (is_off_the_record_) { 109 if (is_off_the_record_) {
110 Profile* profile = content::Source<Profile>(source).ptr(); 110 Profile* profile = content::Source<Profile>(source).ptr();
111 if (profile && profile->IsOffTheRecord()) 111 if (profile && profile->IsOffTheRecord())
112 profile_ = profile; 112 profile_ = profile;
113 } 113 }
114 break; 114 break;
115 default: 115 default:
116 NOTREACHED(); 116 NOTREACHED();
117 } 117 }
118 } 118 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/updated_progress_marker_checker.cc ('k') | chrome/browser/ui/ash/app_sync_ui_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698