| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |