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

Side by Side Diff: chrome/browser/sync/sync_ui_util.cc

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/sync/sync_ui_util.h" 5 #include "chrome/browser/sync/sync_ui_util.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/browser/sync/profile_sync_service.h" 10 #include "chrome/browser/sync/profile_sync_service.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 Profile* profile, ProfileSyncService::SyncEventCodes code) { 181 Profile* profile, ProfileSyncService::SyncEventCodes code) {
182 ProfileSyncService* service = 182 ProfileSyncService* service =
183 profile->GetOriginalProfile()->GetProfileSyncService(); 183 profile->GetOriginalProfile()->GetProfileSyncService();
184 if (!service || !service->IsSyncEnabled()) { 184 if (!service || !service->IsSyncEnabled()) {
185 LOG(DFATAL) << "OpenSyncMyBookmarksDialog called with sync disabled"; 185 LOG(DFATAL) << "OpenSyncMyBookmarksDialog called with sync disabled";
186 return; 186 return;
187 } 187 }
188 if (service->HasSyncSetupCompleted()) { 188 if (service->HasSyncSetupCompleted()) {
189 ShowOptionsWindow(OPTIONS_PAGE_CONTENT, OPTIONS_GROUP_NONE, profile); 189 ShowOptionsWindow(OPTIONS_PAGE_CONTENT, OPTIONS_GROUP_NONE, profile);
190 } else { 190 } else {
191 service->EnableForUser(NULL); 191 service->ShowLoginDialog(NULL);
192 ProfileSyncService::SyncEvent(code); 192 ProfileSyncService::SyncEvent(code); // UMA stats
193 } 193 }
194 } 194 }
195 195
196 } // namespace sync_ui_util 196 } // namespace sync_ui_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698