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

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler.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/ui/webui/sync_internals_ui_unittest.cc ('k') | chrome/browser/webdata/DEPS » ('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/ui/webui/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.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/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/app/chrome_command_ids.h" 13 #include "chrome/app/chrome_command_ids.h"
14 #include "chrome/browser/google/google_util.h" 14 #include "chrome/browser/google/google_util.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/profiles/profile_info_cache.h" 16 #include "chrome/browser/profiles/profile_info_cache.h"
17 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/profiles/profile_metrics.h" 18 #include "chrome/browser/profiles/profile_metrics.h"
19 #include "chrome/browser/signin/signin_manager.h" 19 #include "chrome/browser/signin/signin_manager.h"
20 #include "chrome/browser/signin/signin_manager_factory.h" 20 #include "chrome/browser/signin/signin_manager_factory.h"
21 #include "chrome/browser/sync/profile_sync_service.h" 21 #include "chrome/browser/sync/profile_sync_service.h"
22 #include "chrome/browser/sync/profile_sync_service_factory.h" 22 #include "chrome/browser/sync/profile_sync_service_factory.h"
23 #include "chrome/browser/sync/protocol/service_constants.h"
24 #include "chrome/browser/sync/sync_setup_flow.h" 23 #include "chrome/browser/sync/sync_setup_flow.h"
25 #include "chrome/browser/ui/browser_list.h" 24 #include "chrome/browser/ui/browser_list.h"
26 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 25 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
27 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 26 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
28 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" 27 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h"
29 #include "chrome/common/net/gaia/gaia_constants.h" 28 #include "chrome/common/net/gaia/gaia_constants.h"
30 #include "chrome/common/url_constants.h" 29 #include "chrome/common/url_constants.h"
31 #include "content/public/browser/render_view_host.h" 30 #include "content/public/browser/render_view_host.h"
32 #include "content/public/browser/render_view_host_delegate.h" 31 #include "content/public/browser/render_view_host_delegate.h"
33 #include "content/public/browser/web_contents.h" 32 #include "content/public/browser/web_contents.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"
36 #include "grit/locale_settings.h" 35 #include "grit/locale_settings.h"
36 #include "sync/protocol/service_constants.h"
37 #include "ui/base/l10n/l10n_util.h" 37 #include "ui/base/l10n/l10n_util.h"
38 38
39 using l10n_util::GetStringFUTF16; 39 using l10n_util::GetStringFUTF16;
40 using l10n_util::GetStringUTF16; 40 using l10n_util::GetStringUTF16;
41 41
42 namespace { 42 namespace {
43 43
44 bool GetAuthData(const std::string& json, 44 bool GetAuthData(const std::string& json,
45 std::string* username, 45 std::string* username,
46 std::string* password, 46 std::string* password,
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 if (i != current_profile_index && AreUserNamesEqual( 797 if (i != current_profile_index && AreUserNamesEqual(
798 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) { 798 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) {
799 *error_message = l10n_util::GetStringUTF16( 799 *error_message = l10n_util::GetStringUTF16(
800 IDS_SYNC_USER_NAME_IN_USE_ERROR); 800 IDS_SYNC_USER_NAME_IN_USE_ERROR);
801 return false; 801 return false;
802 } 802 }
803 } 803 }
804 804
805 return true; 805 return true;
806 } 806 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_internals_ui_unittest.cc ('k') | chrome/browser/webdata/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698