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/history_ui.h" | 5 #include "chrome/browser/ui/webui/history_ui.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "chrome/browser/ui/webui/foreign_session_handler.h" | 35 #include "chrome/browser/ui/webui/foreign_session_handler.h" |
36 #include "chrome/browser/ui/webui/history_login_handler.h" | 36 #include "chrome/browser/ui/webui/history_login_handler.h" |
37 #endif | 37 #endif |
38 | 38 |
39 static const char kStringsJsFile[] = "strings.js"; | 39 static const char kStringsJsFile[] = "strings.js"; |
40 static const char kHistoryJsFile[] = "history.js"; | 40 static const char kHistoryJsFile[] = "history.js"; |
41 static const char kOtherDevicesJsFile[] = "other_devices.js"; | 41 static const char kOtherDevicesJsFile[] = "other_devices.js"; |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
| 45 static const char kMyActivityUrl[] = |
| 46 "https://history.google.com/history/?utm_source=chrome_h"; |
| 47 |
45 #if defined(OS_MACOSX) | 48 #if defined(OS_MACOSX) |
46 const char kIncognitoModeShortcut[] = "(" | 49 const char kIncognitoModeShortcut[] = "(" |
47 "\xE2\x87\xA7" // Shift symbol (U+21E7 'UPWARDS WHITE ARROW'). | 50 "\xE2\x87\xA7" // Shift symbol (U+21E7 'UPWARDS WHITE ARROW'). |
48 "\xE2\x8C\x98" // Command symbol (U+2318 'PLACE OF INTEREST SIGN'). | 51 "\xE2\x8C\x98" // Command symbol (U+2318 'PLACE OF INTEREST SIGN'). |
49 "N)"; | 52 "N)"; |
50 #elif defined(OS_WIN) | 53 #elif defined(OS_WIN) |
51 const char kIncognitoModeShortcut[] = "(Ctrl+Shift+N)"; | 54 const char kIncognitoModeShortcut[] = "(Ctrl+Shift+N)"; |
52 #else | 55 #else |
53 const char kIncognitoModeShortcut[] = "(Shift+Ctrl+N)"; | 56 const char kIncognitoModeShortcut[] = "(Shift+Ctrl+N)"; |
54 #endif | 57 #endif |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 source->AddLocalizedString("filterAllowed", IDS_HISTORY_FILTER_ALLOWED); | 124 source->AddLocalizedString("filterAllowed", IDS_HISTORY_FILTER_ALLOWED); |
122 source->AddLocalizedString("filterBlocked", IDS_HISTORY_FILTER_BLOCKED); | 125 source->AddLocalizedString("filterBlocked", IDS_HISTORY_FILTER_BLOCKED); |
123 source->AddLocalizedString("inContentPack", IDS_HISTORY_IN_CONTENT_PACK); | 126 source->AddLocalizedString("inContentPack", IDS_HISTORY_IN_CONTENT_PACK); |
124 source->AddLocalizedString("allowItems", IDS_HISTORY_FILTER_ALLOW_ITEMS); | 127 source->AddLocalizedString("allowItems", IDS_HISTORY_FILTER_ALLOW_ITEMS); |
125 source->AddLocalizedString("blockItems", IDS_HISTORY_FILTER_BLOCK_ITEMS); | 128 source->AddLocalizedString("blockItems", IDS_HISTORY_FILTER_BLOCK_ITEMS); |
126 source->AddLocalizedString("blockedVisitText", | 129 source->AddLocalizedString("blockedVisitText", |
127 IDS_HISTORY_BLOCKED_VISIT_TEXT); | 130 IDS_HISTORY_BLOCKED_VISIT_TEXT); |
128 source->AddLocalizedString("hasSyncedResults", | 131 source->AddLocalizedString("hasSyncedResults", |
129 IDS_HISTORY_HAS_SYNCED_RESULTS); | 132 IDS_HISTORY_HAS_SYNCED_RESULTS); |
130 source->AddLocalizedString("noSyncedResults", IDS_HISTORY_NO_SYNCED_RESULTS); | 133 source->AddLocalizedString("noSyncedResults", IDS_HISTORY_NO_SYNCED_RESULTS); |
| 134 source->AddString("otherFormsOfBrowsingHistory", |
| 135 l10n_util::GetStringFUTF16( |
| 136 IDS_HISTORY_OTHER_FORMS_OF_HISTORY, |
| 137 base::ASCIIToUTF16(kMyActivityUrl))); |
131 source->AddLocalizedString("cancel", IDS_CANCEL); | 138 source->AddLocalizedString("cancel", IDS_CANCEL); |
132 source->AddLocalizedString("deleteConfirm", | 139 source->AddLocalizedString("deleteConfirm", |
133 IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON); | 140 IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON); |
134 source->AddLocalizedString("bookmarked", IDS_HISTORY_ENTRY_BOOKMARKED); | 141 source->AddLocalizedString("bookmarked", IDS_HISTORY_ENTRY_BOOKMARKED); |
135 source->AddLocalizedString("entrySummary", IDS_HISTORY_ENTRY_SUMMARY); | 142 source->AddLocalizedString("entrySummary", IDS_HISTORY_ENTRY_SUMMARY); |
136 source->AddBoolean("isFullHistorySyncEnabled", | 143 source->AddBoolean("isFullHistorySyncEnabled", |
137 WebHistoryServiceFactory::GetForProfile(profile) != NULL); | 144 WebHistoryServiceFactory::GetForProfile(profile) != NULL); |
138 bool group_by_domain = base::CommandLine::ForCurrentProcess()->HasSwitch( | 145 bool group_by_domain = base::CommandLine::ForCurrentProcess()->HasSwitch( |
139 switches::kHistoryEnableGroupByDomain); | 146 switches::kHistoryEnableGroupByDomain); |
140 // Supervised users get the "group by domain" version, but not on mobile, | 147 // Supervised users get the "group by domain" version, but not on mobile, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 188 } |
182 | 189 |
183 HistoryUI::~HistoryUI() {} | 190 HistoryUI::~HistoryUI() {} |
184 | 191 |
185 // static | 192 // static |
186 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( | 193 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( |
187 ui::ScaleFactor scale_factor) { | 194 ui::ScaleFactor scale_factor) { |
188 return ResourceBundle::GetSharedInstance(). | 195 return ResourceBundle::GetSharedInstance(). |
189 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); | 196 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); |
190 } | 197 } |
OLD | NEW |