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

Side by Side Diff: chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc

Issue 1419103009: [Sync] Componentize ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@max_bogue_sync_backend_host
Patch Set: Rebase Created 5 years, 1 month 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
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/ntp/new_tab_page_sync_handler.h" 5 #include "chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/signin/signin_manager_factory.h" 17 #include "chrome/browser/signin/signin_manager_factory.h"
18 #include "chrome/browser/signin/signin_promo.h" 18 #include "chrome/browser/signin/signin_promo.h"
19 #include "chrome/browser/sync/profile_sync_service.h"
20 #include "chrome/browser/sync/profile_sync_service_factory.h" 19 #include "chrome/browser/sync/profile_sync_service_factory.h"
21 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
22 #include "chrome/browser/ui/browser_finder.h" 21 #include "chrome/browser/ui/browser_finder.h"
23 #include "chrome/browser/ui/chrome_pages.h" 22 #include "chrome/browser/ui/chrome_pages.h"
24 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 23 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
25 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 24 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
26 #include "chrome/common/pref_names.h" 25 #include "chrome/common/pref_names.h"
27 #include "chrome/grit/generated_resources.h" 26 #include "chrome/grit/generated_resources.h"
27 #include "components/browser_sync/browser/profile_sync_service.h"
28 #include "components/signin/core/browser/signin_manager.h" 28 #include "components/signin/core/browser/signin_manager.h"
29 #include "components/signin/core/common/signin_pref_names.h" 29 #include "components/signin/core/common/signin_pref_names.h"
30 #include "content/public/browser/render_view_host.h" 30 #include "content/public/browser/render_view_host.h"
31 #include "content/public/browser/web_ui.h" 31 #include "content/public/browser/web_ui.h"
32 #include "net/cookies/cookie_monster.h" 32 #include "net/cookies/cookie_monster.h"
33 #include "net/url_request/url_request_context.h" 33 #include "net/url_request/url_request_context.h"
34 #include "ui/base/l10n/l10n_util.h" 34 #include "ui/base/l10n/l10n_util.h"
35 35
36 NewTabPageSyncHandler::NewTabPageSyncHandler() : sync_service_(NULL), 36 NewTabPageSyncHandler::NewTabPageSyncHandler() : sync_service_(NULL),
37 waiting_for_initial_page_load_(true) { 37 waiting_for_initial_page_load_(true) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if (linkurl.empty()) { 196 if (linkurl.empty()) {
197 value.SetBoolean("linkurlisset", false); 197 value.SetBoolean("linkurlisset", false);
198 } else { 198 } else {
199 value.SetBoolean("linkurlisset", true); 199 value.SetBoolean("linkurlisset", true);
200 value.SetString("linkurl", linkurl); 200 value.SetString("linkurl", linkurl);
201 } 201 }
202 } 202 }
203 } 203 }
204 web_ui()->CallJavascriptFunction("ntp.syncMessageChanged", value); 204 web_ui()->CallJavascriptFunction("ntp.syncMessageChanged", value);
205 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698