| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/printing/cloud_print/cloud_print_setup_source.h" | 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_source.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | |
| 11 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 12 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 13 #include "base/values.h" | 12 #include "base/values.h" |
| 14 #include "chrome/browser/google/google_util.h" | 13 #include "chrome/browser/google/google_util.h" |
| 15 #include "chrome/common/jstemplate_builder.h" | 14 #include "chrome/common/jstemplate_builder.h" |
| 16 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 17 #include "grit/app_resources.h" | 16 #include "grit/app_resources.h" |
| 18 #include "grit/browser_resources.h" | 17 #include "grit/browser_resources.h" |
| 19 #include "grit/chromium_strings.h" | 18 #include "grit/chromium_strings.h" |
| 20 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
| 21 #include "grit/locale_settings.h" | 20 #include "grit/locale_settings.h" |
| 21 #include "ui/base/resource/resource_bundle.h" |
| 22 | 22 |
| 23 // Define the values of standard URLs. | 23 // Define the values of standard URLs. |
| 24 const char CloudPrintSetupSource::kInvalidPasswordHelpUrl[] = | 24 const char CloudPrintSetupSource::kInvalidPasswordHelpUrl[] = |
| 25 "http://www.google.com/support/accounts/bin/answer.py?ctx=ch&answer=27444"; | 25 "http://www.google.com/support/accounts/bin/answer.py?ctx=ch&answer=27444"; |
| 26 const char CloudPrintSetupSource::kCanNotAccessAccountUrl[] = | 26 const char CloudPrintSetupSource::kCanNotAccessAccountUrl[] = |
| 27 "http://www.google.com/support/accounts/bin/answer.py?answer=48598"; | 27 "http://www.google.com/support/accounts/bin/answer.py?answer=48598"; |
| 28 const char CloudPrintSetupSource::kCreateNewAccountUrl[] = | 28 const char CloudPrintSetupSource::kCreateNewAccountUrl[] = |
| 29 "https://www.google.com/accounts/NewAccount?service=chromiumsync"; | 29 "https://www.google.com/accounts/NewAccount?service=chromiumsync"; |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 return "text/html"; | 129 return "text/html"; |
| 130 } | 130 } |
| 131 | 131 |
| 132 std::string CloudPrintSetupSource::GetLocalizedUrl( | 132 std::string CloudPrintSetupSource::GetLocalizedUrl( |
| 133 const std::string& url) const { | 133 const std::string& url) const { |
| 134 GURL original_url(url); | 134 GURL original_url(url); |
| 135 DCHECK(original_url.is_valid()); | 135 DCHECK(original_url.is_valid()); |
| 136 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); | 136 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); |
| 137 return localized_url.spec(); | 137 return localized_url.spec(); |
| 138 } | 138 } |
| OLD | NEW |