| 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 #import "chrome/browser/ui/cocoa/options/preferences_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/options/preferences_window_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/l10n_util_mac.h" | 10 #include "app/l10n_util_mac.h" |
| (...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1389 // "stop syncing" button. Bring up a confirmation dialog before | 1389 // "stop syncing" button. Bring up a confirmation dialog before |
| 1390 // actually stopping syncing (see stopSyncAlertDidEnd). | 1390 // actually stopping syncing (see stopSyncAlertDidEnd). |
| 1391 scoped_nsobject<NSAlert> alert([[NSAlert alloc] init]); | 1391 scoped_nsobject<NSAlert> alert([[NSAlert alloc] init]); |
| 1392 [alert addButtonWithTitle:l10n_util::GetNSStringWithFixup( | 1392 [alert addButtonWithTitle:l10n_util::GetNSStringWithFixup( |
| 1393 IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL)]; | 1393 IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL)]; |
| 1394 [alert addButtonWithTitle:l10n_util::GetNSStringWithFixup( | 1394 [alert addButtonWithTitle:l10n_util::GetNSStringWithFixup( |
| 1395 IDS_CANCEL)]; | 1395 IDS_CANCEL)]; |
| 1396 [alert setMessageText:l10n_util::GetNSStringWithFixup( | 1396 [alert setMessageText:l10n_util::GetNSStringWithFixup( |
| 1397 IDS_SYNC_STOP_SYNCING_DIALOG_TITLE)]; | 1397 IDS_SYNC_STOP_SYNCING_DIALOG_TITLE)]; |
| 1398 [alert setInformativeText:l10n_util::GetNSStringFWithFixup( | 1398 [alert setInformativeText:l10n_util::GetNSStringFWithFixup( |
| 1399 IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL, | 1399 IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL)]; |
| 1400 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))]; | |
| 1401 [alert setAlertStyle:NSWarningAlertStyle]; | 1400 [alert setAlertStyle:NSWarningAlertStyle]; |
| 1402 const SEL kEndSelector = | 1401 const SEL kEndSelector = |
| 1403 @selector(stopSyncAlertDidEnd:returnCode:contextInfo:); | 1402 @selector(stopSyncAlertDidEnd:returnCode:contextInfo:); |
| 1404 [alert beginSheetModalForWindow:[self window] | 1403 [alert beginSheetModalForWindow:[self window] |
| 1405 modalDelegate:self | 1404 modalDelegate:self |
| 1406 didEndSelector:kEndSelector | 1405 didEndSelector:kEndSelector |
| 1407 contextInfo:NULL]; | 1406 contextInfo:NULL]; |
| 1408 } else { | 1407 } else { |
| 1409 // Otherwise, the sync button was a "sync my bookmarks" button. | 1408 // Otherwise, the sync button was a "sync my bookmarks" button. |
| 1410 // Kick off the sync setup process. | 1409 // Kick off the sync setup process. |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 case OPTIONS_PAGE_ADVANCED: | 2163 case OPTIONS_PAGE_ADVANCED: |
| 2165 return underTheHoodView_; | 2164 return underTheHoodView_; |
| 2166 case OPTIONS_PAGE_DEFAULT: | 2165 case OPTIONS_PAGE_DEFAULT: |
| 2167 case OPTIONS_PAGE_COUNT: | 2166 case OPTIONS_PAGE_COUNT: |
| 2168 LOG(DFATAL) << "Invalid page value " << page; | 2167 LOG(DFATAL) << "Invalid page value " << page; |
| 2169 } | 2168 } |
| 2170 return basicsView_; | 2169 return basicsView_; |
| 2171 } | 2170 } |
| 2172 | 2171 |
| 2173 @end | 2172 @end |
| OLD | NEW |