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

Side by Side Diff: chrome/browser/views/options/content_page_view.cc

Issue 2878012: Revert 50902 - New HTML Sync Setup UI.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/450/src/
Patch Set: Created 10 years, 5 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
« no previous file with comments | « chrome/browser/sync/syncable/model_type.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/options/content_page_view.h" 5 #include "chrome/browser/views/options/content_page_view.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
11 11
12 #include "app/l10n_util.h" 12 #include "app/l10n_util.h"
13 #include "app/resource_bundle.h" 13 #include "app/resource_bundle.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "chrome/browser/autofill/autofill_dialog.h" 16 #include "chrome/browser/autofill/autofill_dialog.h"
17 #include "chrome/browser/autofill/personal_data_manager.h" 17 #include "chrome/browser/autofill/personal_data_manager.h"
18 #include "chrome/browser/browser.h" 18 #include "chrome/browser/browser.h"
19 #include "chrome/browser/browser_list.h" 19 #include "chrome/browser/browser_list.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/browser_window.h" 21 #include "chrome/browser/browser_window.h"
22 #include "chrome/browser/importer/importer_data_types.h" 22 #include "chrome/browser/importer/importer_data_types.h"
23 #include "chrome/browser/profile.h" 23 #include "chrome/browser/profile.h"
24 #include "chrome/browser/sync/sync_ui_util.h" 24 #include "chrome/browser/sync/sync_ui_util.h"
25 #include "chrome/browser/sync/sync_setup_wizard.h"
26 #include "chrome/browser/views/importer_view.h" 25 #include "chrome/browser/views/importer_view.h"
27 #include "chrome/browser/views/options/customize_sync_window_view.h" 26 #include "chrome/browser/views/options/customize_sync_window_view.h"
28 #include "chrome/browser/views/options/options_group_view.h" 27 #include "chrome/browser/views/options/options_group_view.h"
29 #include "chrome/browser/views/options/passwords_exceptions_window_view.h" 28 #include "chrome/browser/views/options/passwords_exceptions_window_view.h"
30 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
32 #include "gfx/canvas.h" 31 #include "gfx/canvas.h"
33 #include "gfx/native_theme_win.h" 32 #include "gfx/native_theme_win.h"
34 #include "grit/chromium_strings.h" 33 #include "grit/chromium_strings.h"
35 #include "grit/generated_resources.h" 34 #include "grit/generated_resources.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 IDS_CONFIRM_STOP_SYNCING_DIALOG_WIDTH_CHARS, 150 IDS_CONFIRM_STOP_SYNCING_DIALOG_WIDTH_CHARS,
152 IDS_CONFIRM_STOP_SYNCING_DIALOG_HEIGHT_LINES))); 151 IDS_CONFIRM_STOP_SYNCING_DIALOG_HEIGHT_LINES)));
153 return; 152 return;
154 } else { 153 } else {
155 sync_service_->EnableForUser(); 154 sync_service_->EnableForUser();
156 ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS); 155 ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS);
157 } 156 }
158 } else if (sender == sync_customize_button_) { 157 } else if (sender == sync_customize_button_) {
159 // sync_customize_button_ should be invisible if sync is not yet set up. 158 // sync_customize_button_ should be invisible if sync is not yet set up.
160 DCHECK(sync_service_->HasSyncSetupCompleted()); 159 DCHECK(sync_service_->HasSyncSetupCompleted());
161 sync_service_->ShowChooseDataTypes(); 160 CustomizeSyncWindowView::Show(GetWindow()->GetNativeWindow(), profile());
162 } 161 }
163 } 162 }
164 163
165 void ContentPageView::LinkActivated(views::Link* source, int event_flags) { 164 void ContentPageView::LinkActivated(views::Link* source, int event_flags) {
166 if (source == themes_gallery_link_) { 165 if (source == themes_gallery_link_) {
167 UserMetricsRecordAction(UserMetricsAction("Options_ThemesGallery"), 166 UserMetricsRecordAction(UserMetricsAction("Options_ThemesGallery"),
168 profile()->GetPrefs()); 167 profile()->GetPrefs());
169 BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate(); 168 BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate();
170 return; 169 return;
171 } 170 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 sync_action_link_->SetVisible(!link_label.empty()); 497 sync_action_link_->SetVisible(!link_label.empty());
499 498
500 if (status_has_error) { 499 if (status_has_error) {
501 sync_status_label_->set_background(CreateErrorBackground()); 500 sync_status_label_->set_background(CreateErrorBackground());
502 sync_action_link_->set_background(CreateErrorBackground()); 501 sync_action_link_->set_background(CreateErrorBackground());
503 } else { 502 } else {
504 sync_status_label_->set_background(NULL); 503 sync_status_label_->set_background(NULL);
505 sync_action_link_->set_background(NULL); 504 sync_action_link_->set_background(NULL);
506 } 505 }
507 } 506 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/syncable/model_type.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698