| 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/new_tab_page_sync_handler.h" | 5 #include "chrome/browser/ui/webui/new_tab_page_sync_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/net/chrome_url_request_context.h" | 14 #include "chrome/browser/net/chrome_url_request_context.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/renderer_host/render_view_host.h" | 16 #include "content/browser/renderer_host/render_view_host.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 #include "net/base/cookie_monster.h" | 18 #include "net/base/cookie_monster.h" |
| 19 #include "net/url_request/url_request_context.h" | 19 #include "net/url_request/url_request_context.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 | 21 |
| 22 // Default URL for the sync web interface. | 22 // Default URL for the sync web interface. |
| 23 // | 23 // |
| 24 // TODO(idana): when we figure out how we are going to allow third parties to | 24 // TODO(idana): when we figure out how we are going to allow third parties to |
| 25 // plug in their own sync engine, we should allow this value to be | 25 // plug in their own sync engine, we should allow this value to be |
| 26 // configurable. | 26 // configurable. |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 if (linkurl.empty()) { | 211 if (linkurl.empty()) { |
| 212 value.SetBoolean("linkurlisset", false); | 212 value.SetBoolean("linkurlisset", false); |
| 213 } else { | 213 } else { |
| 214 value.SetBoolean("linkurlisset", true); | 214 value.SetBoolean("linkurlisset", true); |
| 215 value.SetString("linkurl", linkurl); | 215 value.SetString("linkurl", linkurl); |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 web_ui_->CallJavascriptFunction(L"syncMessageChanged", value); | 219 web_ui_->CallJavascriptFunction(L"syncMessageChanged", value); |
| 220 } | 220 } |
| OLD | NEW |