OLD | NEW |
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/ntp_resource_cache.h" | 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "apps/app_launcher.h" | 10 #include "apps/app_launcher.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #if defined(OS_CHROMEOS) | 75 #if defined(OS_CHROMEOS) |
76 "https://www.google.com/support/chromeos/bin/answer.py?answer=95464"; | 76 "https://www.google.com/support/chromeos/bin/answer.py?answer=95464"; |
77 #else | 77 #else |
78 "https://www.google.com/support/chrome/bin/answer.py?answer=95464"; | 78 "https://www.google.com/support/chrome/bin/answer.py?answer=95464"; |
79 #endif | 79 #endif |
80 | 80 |
81 // The URL for the Learn More page shown on guest session new tab. | 81 // The URL for the Learn More page shown on guest session new tab. |
82 const char kLearnMoreGuestSessionUrl[] = | 82 const char kLearnMoreGuestSessionUrl[] = |
83 "https://www.google.com/support/chromeos/bin/answer.py?answer=1057090"; | 83 "https://www.google.com/support/chromeos/bin/answer.py?answer=1057090"; |
84 | 84 |
85 // The URL for bookmark sync service help. | |
86 const char kSyncServiceHelpUrl[] = | |
87 "https://www.google.com/support/chrome/bin/answer.py?answer=165139"; | |
88 | |
89 // The URL to be loaded to display Help. | |
90 const char kHelpContentUrl[] = | |
91 "https://www.google.com/support/chrome/"; | |
92 | |
93 string16 GetUrlWithLang(const GURL& url) { | 85 string16 GetUrlWithLang(const GURL& url) { |
94 return ASCIIToUTF16(google_util::AppendGoogleLocaleParam(url).spec()); | 86 return ASCIIToUTF16(google_util::AppendGoogleLocaleParam(url).spec()); |
95 } | 87 } |
96 | 88 |
97 std::string SkColorToRGBAString(SkColor color) { | 89 std::string SkColorToRGBAString(SkColor color) { |
98 // We convert the alpha using DoubleToString because StringPrintf will use | 90 // We convert the alpha using DoubleToString because StringPrintf will use |
99 // locale specific formatters (e.g., use , instead of . in German). | 91 // locale specific formatters (e.g., use , instead of . in German). |
100 return base::StringPrintf( | 92 return base::StringPrintf( |
101 "rgba(%d,%d,%d,%s)", | 93 "rgba(%d,%d,%d,%s)", |
102 SkColorGetR(color), | 94 SkColorGetR(color), |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 // Get our template. | 694 // Get our template. |
703 static const base::StringPiece new_tab_theme_css( | 695 static const base::StringPiece new_tab_theme_css( |
704 ResourceBundle::GetSharedInstance().GetRawDataResource( | 696 ResourceBundle::GetSharedInstance().GetRawDataResource( |
705 IDR_NEW_TAB_4_THEME_CSS)); | 697 IDR_NEW_TAB_4_THEME_CSS)); |
706 | 698 |
707 // Create the string from our template and the replacements. | 699 // Create the string from our template and the replacements. |
708 std::string css_string; | 700 std::string css_string; |
709 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 701 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
710 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 702 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
711 } | 703 } |
OLD | NEW |