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

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

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/string_split.h" 11 #include "base/string_split.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/net/chrome_url_request_context.h" 15 #include "chrome/browser/net/chrome_url_request_context.h"
16 #include "chrome/browser/prefs/pref_service.h" 16 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "content/browser/renderer_host/render_view_host.h" 19 #include "content/browser/renderer_host/render_view_host.h"
20 #include "content/browser/webui/web_ui.h"
20 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
21 #include "net/base/cookie_monster.h" 22 #include "net/base/cookie_monster.h"
22 #include "net/url_request/url_request_context.h" 23 #include "net/url_request/url_request_context.h"
23 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
24 25
25 // Default URL for the sync web interface. 26 // Default URL for the sync web interface.
26 // 27 //
27 // TODO(idana): when we figure out how we are going to allow third parties to 28 // TODO(idana): when we figure out how we are going to allow third parties to
28 // plug in their own sync engine, we should allow this value to be 29 // plug in their own sync engine, we should allow this value to be
29 // configurable. 30 // configurable.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (linkurl.empty()) { 171 if (linkurl.empty()) {
171 value.SetBoolean("linkurlisset", false); 172 value.SetBoolean("linkurlisset", false);
172 } else { 173 } else {
173 value.SetBoolean("linkurlisset", true); 174 value.SetBoolean("linkurlisset", true);
174 value.SetString("linkurl", linkurl); 175 value.SetString("linkurl", linkurl);
175 } 176 }
176 } 177 }
177 } 178 }
178 web_ui()->CallJavascriptFunction("syncMessageChanged", value); 179 web_ui()->CallJavascriptFunction("syncMessageChanged", value);
179 } 180 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h ('k') | chrome/browser/ui/webui/ntp/ntp_login_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698