Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: chrome/browser/ui/webui/history_ui.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 switches::kHistoryEnableGroupByDomain)); 180 switches::kHistoryEnableGroupByDomain));
181 source->AddBoolean("allowDeletingHistory", 181 source->AddBoolean("allowDeletingHistory",
182 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory)); 182 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory));
183 source->AddBoolean("isInstantExtendedApiEnabled", 183 source->AddBoolean("isInstantExtendedApiEnabled",
184 chrome::IsInstantExtendedAPIEnabled()); 184 chrome::IsInstantExtendedAPIEnabled());
185 185
186 source->SetJsonPath(kStringsJsFile); 186 source->SetJsonPath(kStringsJsFile);
187 source->AddResourcePath(kHistoryJsFile, IDR_HISTORY_JS); 187 source->AddResourcePath(kHistoryJsFile, IDR_HISTORY_JS);
188 source->AddResourcePath(kOtherDevicesJsFile, IDR_OTHER_DEVICES_JS); 188 source->AddResourcePath(kOtherDevicesJsFile, IDR_OTHER_DEVICES_JS);
189 source->SetDefaultResource(IDR_HISTORY_HTML); 189 source->SetDefaultResource(IDR_HISTORY_HTML);
190 source->SetUseJsonJSFormatV2();
191 source->DisableDenyXFrameOptions(); 190 source->DisableDenyXFrameOptions();
192 source->AddBoolean("isSupervisedProfile", profile->IsSupervised()); 191 source->AddBoolean("isSupervisedProfile", profile->IsSupervised());
193 source->AddBoolean("showDeleteVisitUI", !profile->IsSupervised()); 192 source->AddBoolean("showDeleteVisitUI", !profile->IsSupervised());
194 193
195 return source; 194 return source;
196 } 195 }
197 196
198 // Returns a localized version of |visit_time| including a relative 197 // Returns a localized version of |visit_time| including a relative
199 // indicator (e.g. today, yesterday). 198 // indicator (e.g. today, yesterday).
200 base::string16 getRelativeDateLocalized(const base::Time& visit_time) { 199 base::string16 getRelativeDateLocalized(const base::Time& visit_time) {
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 Profile* profile = Profile::FromWebUI(web_ui); 1016 Profile* profile = Profile::FromWebUI(web_ui);
1018 content::WebUIDataSource::Add(profile, CreateHistoryUIHTMLSource(profile)); 1017 content::WebUIDataSource::Add(profile, CreateHistoryUIHTMLSource(profile));
1019 } 1018 }
1020 1019
1021 // static 1020 // static
1022 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( 1021 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes(
1023 ui::ScaleFactor scale_factor) { 1022 ui::ScaleFactor scale_factor) {
1024 return ResourceBundle::GetSharedInstance(). 1023 return ResourceBundle::GetSharedInstance().
1025 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); 1024 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor);
1026 } 1025 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/help/help_ui.cc ('k') | chrome/browser/ui/webui/identity_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698