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

Side by Side Diff: chrome/browser/ui/webui/options2/stop_syncing_handler.cc

Issue 9814030: get rid of old options pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/options/stop_syncing_handler.h" 5 #include "chrome/browser/ui/webui/options2/stop_syncing_handler.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/google/google_util.h" 11 #include "chrome/browser/google/google_util.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/sync/profile_sync_service.h" 14 #include "chrome/browser/sync/profile_sync_service.h"
15 #include "chrome/browser/sync/profile_sync_service_factory.h" 15 #include "chrome/browser/sync/profile_sync_service_factory.h"
16 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
17 #include "content/public/browser/web_ui.h" 17 #include "content/public/browser/web_ui.h"
18 #include "grit/chromium_strings.h" 18 #include "grit/chromium_strings.h"
19 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
20 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
21 21
22 namespace options2 {
23
22 StopSyncingHandler::StopSyncingHandler() { 24 StopSyncingHandler::StopSyncingHandler() {
23 } 25 }
24 26
25 StopSyncingHandler::~StopSyncingHandler() { 27 StopSyncingHandler::~StopSyncingHandler() {
26 } 28 }
27 29
28 void StopSyncingHandler::GetLocalizedValues( 30 void StopSyncingHandler::GetLocalizedValues(
29 DictionaryValue* localized_strings) { 31 DictionaryValue* localized_strings) {
30 DCHECK(localized_strings); 32 DCHECK(localized_strings);
31 localized_strings->SetString("stopSyncingExplanation", 33 localized_strings->SetString("stopSyncingExplanation",
(...skipping 14 matching lines...) Expand all
46 } 48 }
47 49
48 void StopSyncingHandler::StopSyncing(const ListValue* args){ 50 void StopSyncingHandler::StopSyncing(const ListValue* args){
49 ProfileSyncService* service(ProfileSyncServiceFactory:: 51 ProfileSyncService* service(ProfileSyncServiceFactory::
50 GetInstance()->GetForProfile(Profile::FromWebUI(web_ui()))); 52 GetInstance()->GetForProfile(Profile::FromWebUI(web_ui())));
51 if (service != NULL && ProfileSyncService::IsSyncEnabled()) { 53 if (service != NULL && ProfileSyncService::IsSyncEnabled()) {
52 service->DisableForUser(); 54 service->DisableForUser();
53 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); 55 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
54 } 56 }
55 } 57 }
58
59 } // namespace options2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698