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/i18n/number_formatting.h" | 7 #include "base/i18n/number_formatting.h" |
8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 LOG(DFATAL) << "OpenSyncMyBookmarksDialog called with sync disabled"; | 269 LOG(DFATAL) << "OpenSyncMyBookmarksDialog called with sync disabled"; |
270 return; | 270 return; |
271 } | 271 } |
272 | 272 |
273 if (service->HasSyncSetupCompleted()) { | 273 if (service->HasSyncSetupCompleted()) { |
274 bool create_window = browser == NULL; | 274 bool create_window = browser == NULL; |
275 if (create_window) | 275 if (create_window) |
276 browser = Browser::Create(profile); | 276 browser = Browser::Create(profile); |
277 browser->ShowOptionsTab(chrome::kPersonalOptionsSubPage); | 277 browser->ShowOptionsTab(chrome::kPersonalOptionsSubPage); |
278 if (create_window) | 278 if (create_window) |
279 browser->window()->Show(); | 279 browser->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL); |
280 } else { | 280 } else { |
281 service->ShowLoginDialog(); | 281 service->ShowLoginDialog(); |
282 ProfileSyncService::SyncEvent(code); // UMA stats | 282 ProfileSyncService::SyncEvent(code); // UMA stats |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 void AddBoolSyncDetail(ListValue* details, | 286 void AddBoolSyncDetail(ListValue* details, |
287 const std::string& stat_name, | 287 const std::string& stat_name, |
288 bool stat_value) { | 288 bool stat_value) { |
289 DictionaryValue* val = new DictionaryValue; | 289 DictionaryValue* val = new DictionaryValue; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 DictionaryValue* val = new DictionaryValue; | 488 DictionaryValue* val = new DictionaryValue; |
489 val->SetString("model_type", ModelTypeToString(it->first)); | 489 val->SetString("model_type", ModelTypeToString(it->first)); |
490 val->SetString("group", ModelSafeGroupToString(it->second)); | 490 val->SetString("group", ModelSafeGroupToString(it->second)); |
491 routing_info->Append(val); | 491 routing_info->Append(val); |
492 } | 492 } |
493 } | 493 } |
494 } | 494 } |
495 } | 495 } |
496 | 496 |
497 } // namespace sync_ui_util | 497 } // namespace sync_ui_util |
OLD | NEW |