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

Side by Side Diff: chrome/browser/sync/sync_setup_flow.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments 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
« no previous file with comments | « chrome/browser/sync/sync_setup_flow.h ('k') | chrome/browser/sync/sync_ui_util.cc » ('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) 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/sync/sync_setup_flow.h" 5 #include "chrome/browser/sync/sync_setup_flow.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/prefs/pref_service.h" 15 #include "chrome/browser/prefs/pref_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/signin/signin_manager.h" 17 #include "chrome/browser/signin/signin_manager.h"
18 #include "chrome/browser/sync/profile_sync_service.h" 18 #include "chrome/browser/sync/profile_sync_service.h"
19 #include "chrome/browser/sync/profile_sync_service_factory.h" 19 #include "chrome/browser/sync/profile_sync_service_factory.h"
20 #include "chrome/browser/sync/sync_setup_flow_handler.h" 20 #include "chrome/browser/sync/sync_setup_flow_handler.h"
21 #include "chrome/browser/sync/syncable/model_type.h"
22 #include "chrome/browser/sync/user_selectable_sync_type.h" 21 #include "chrome/browser/sync/user_selectable_sync_type.h"
23 #include "chrome/browser/ui/browser_list.h" 22 #include "chrome/browser/ui/browser_list.h"
24 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/net/gaia/gaia_constants.h" 24 #include "chrome/common/net/gaia/gaia_constants.h"
26 #include "chrome/common/net/gaia/google_service_auth_error.h" 25 #include "chrome/common/net/gaia/google_service_auth_error.h"
27 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
28 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
29 #include "grit/generated_resources.h" 28 #include "grit/generated_resources.h"
29 #include "sync/syncable/model_type.h"
30 30
31 namespace { 31 namespace {
32 32
33 // Helper function to disable password sync. 33 // Helper function to disable password sync.
34 void DisablePasswordSync(ProfileSyncService* service) { 34 void DisablePasswordSync(ProfileSyncService* service) {
35 syncable::ModelTypeSet types = service->GetPreferredDataTypes(); 35 syncable::ModelTypeSet types = service->GetPreferredDataTypes();
36 types.Remove(syncable::PASSWORDS); 36 types.Remove(syncable::PASSWORDS);
37 service->OnUserChoseDatatypes(false, types); 37 service->OnUserChoseDatatypes(false, types);
38 } 38 }
39 39
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 case SyncSetupWizard::DONE: 497 case SyncSetupWizard::DONE:
498 case SyncSetupWizard::ABORT: 498 case SyncSetupWizard::ABORT:
499 flow_handler_->ShowSetupDone(UTF8ToUTF16( 499 flow_handler_->ShowSetupDone(UTF8ToUTF16(
500 service_->profile()->GetPrefs()->GetString( 500 service_->profile()->GetPrefs()->GetString(
501 prefs::kGoogleServicesUsername))); 501 prefs::kGoogleServicesUsername)));
502 break; 502 break;
503 default: 503 default:
504 NOTREACHED() << "Invalid advance state: " << state; 504 NOTREACHED() << "Invalid advance state: " << state;
505 } 505 }
506 } 506 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_setup_flow.h ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698