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

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

Issue 7093004: Sync: Refactor the ProfileSyncService and sync setup flow to remove use of WebUI from PSS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes and cleanups. Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/number_formatting.h" 8 #include "base/i18n/number_formatting.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 if (service->HasSyncSetupCompleted()) { 272 if (service->HasSyncSetupCompleted()) {
273 bool create_window = browser == NULL; 273 bool create_window = browser == NULL;
274 if (create_window) 274 if (create_window)
275 browser = Browser::Create(profile); 275 browser = Browser::Create(profile);
276 browser->ShowOptionsTab(chrome::kPersonalOptionsSubPage); 276 browser->ShowOptionsTab(chrome::kPersonalOptionsSubPage);
277 if (create_window) 277 if (create_window)
278 browser->window()->Show(); 278 browser->window()->Show();
279 } else { 279 } else {
280 service->ShowLoginDialog(NULL); 280 service->ShowLoginDialog();
281 ProfileSyncService::SyncEvent(code); // UMA stats 281 ProfileSyncService::SyncEvent(code); // UMA stats
282 } 282 }
283 } 283 }
284 284
285 void AddBoolSyncDetail(ListValue* details, 285 void AddBoolSyncDetail(ListValue* details,
286 const std::string& stat_name, 286 const std::string& stat_name,
287 bool stat_value) { 287 bool stat_value) {
288 DictionaryValue* val = new DictionaryValue; 288 DictionaryValue* val = new DictionaryValue;
289 val->SetString("stat_name", stat_name); 289 val->SetString("stat_name", stat_name);
290 val->SetBoolean("stat_value", stat_value); 290 val->SetBoolean("stat_value", stat_value);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 493
494 DictionaryValue* val = new DictionaryValue; 494 DictionaryValue* val = new DictionaryValue;
495 val->SetString("stat_name", "Autofill Migration Time"); 495 val->SetString("stat_name", "Autofill Migration Time");
496 val->SetString("stat_value", ConstructTime(info.autofill_migration_time)); 496 val->SetString("stat_value", ConstructTime(info.autofill_migration_time));
497 details->Append(val); 497 details->Append(val);
498 } 498 }
499 } 499 }
500 } 500 }
501 501
502 } // namespace sync_ui_util 502 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_setup_wizard_unittest.cc ('k') | chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698