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

Side by Side Diff: chrome/browser/dom_ui/options/sync_options_handler.cc

Issue 3655004: Add UI for setting the encryption passphrase.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixes Created 10 years, 2 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/browser_resources.grd ('k') | chrome/browser/sync/profile_sync_service.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/dom_ui/options/sync_options_handler.h" 5 #include "chrome/browser/dom_ui/options/sync_options_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 void SyncOptionsHandler::Initialize() { 57 void SyncOptionsHandler::Initialize() {
58 ProfileSyncService* service = 58 ProfileSyncService* service =
59 dom_ui_->GetProfile()->GetOriginalProfile()->GetProfileSyncService(); 59 dom_ui_->GetProfile()->GetOriginalProfile()->GetProfileSyncService();
60 // If service is unavailable for some good reason, 'IsEnabled()' method 60 // If service is unavailable for some good reason, 'IsEnabled()' method
61 // should return false. Otherwise something is broken. 61 // should return false. Otherwise something is broken.
62 DCHECK(service); 62 DCHECK(service);
63 63
64 DictionaryValue args; 64 DictionaryValue args;
65 SyncSetupFlow::GetArgsForChooseDataTypes(service, &args); 65 SyncSetupFlow::GetArgsForConfigure(service, &args);
66 66
67 dom_ui_->CallJavascriptFunction(L"SyncOptions.setRegisteredDataTypes", args); 67 dom_ui_->CallJavascriptFunction(L"SyncOptions.setRegisteredDataTypes", args);
68 } 68 }
69 69
70 void SyncOptionsHandler::RegisterMessages() { 70 void SyncOptionsHandler::RegisterMessages() {
71 dom_ui_->RegisterMessageCallback("updatePreferredDataTypes", 71 dom_ui_->RegisterMessageCallback("updatePreferredDataTypes",
72 NewCallback(this, &SyncOptionsHandler::OnPreferredDataTypesUpdated)); 72 NewCallback(this, &SyncOptionsHandler::OnPreferredDataTypesUpdated));
73 } 73 }
74 74
75 void SyncOptionsHandler::OnPreferredDataTypesUpdated(const ListValue* args) { 75 void SyncOptionsHandler::OnPreferredDataTypesUpdated(const ListValue* args) {
76 NotificationService::current()->Notify( 76 NotificationService::current()->Notify(
77 NotificationType::SYNC_DATA_TYPES_UPDATED, 77 NotificationType::SYNC_DATA_TYPES_UPDATED,
78 Source<Profile>(dom_ui_->GetProfile()), 78 Source<Profile>(dom_ui_->GetProfile()),
79 NotificationService::NoDetails()); 79 NotificationService::NoDetails());
80 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698