| OLD | NEW |
| 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 Loading... |
| 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(); | 280 service->ShowLoginDialog(NULL); |
| 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 Loading... |
| 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 |
| OLD | NEW |