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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 source->AddLocalizedString("hasSyncedResults", 183 source->AddLocalizedString("hasSyncedResults",
184 IDS_HISTORY_HAS_SYNCED_RESULTS); 184 IDS_HISTORY_HAS_SYNCED_RESULTS);
185 source->AddLocalizedString("noSyncedResults", IDS_HISTORY_NO_SYNCED_RESULTS); 185 source->AddLocalizedString("noSyncedResults", IDS_HISTORY_NO_SYNCED_RESULTS);
186 source->AddLocalizedString("cancel", IDS_CANCEL); 186 source->AddLocalizedString("cancel", IDS_CANCEL);
187 source->AddLocalizedString("deleteConfirm", 187 source->AddLocalizedString("deleteConfirm",
188 IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON); 188 IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON);
189 source->AddLocalizedString("bookmarked", IDS_HISTORY_ENTRY_BOOKMARKED); 189 source->AddLocalizedString("bookmarked", IDS_HISTORY_ENTRY_BOOKMARKED);
190 source->AddLocalizedString("entrySummary", IDS_HISTORY_ENTRY_SUMMARY); 190 source->AddLocalizedString("entrySummary", IDS_HISTORY_ENTRY_SUMMARY);
191 source->AddBoolean("isFullHistorySyncEnabled", 191 source->AddBoolean("isFullHistorySyncEnabled",
192 WebHistoryServiceFactory::GetForProfile(profile) != NULL); 192 WebHistoryServiceFactory::GetForProfile(profile) != NULL);
193 source->AddBoolean("groupByDomain", profile->IsSupervised() || 193 source->AddBoolean("groupByDomain",
194 CommandLine::ForCurrentProcess()->HasSwitch( 194 profile->IsSupervised() ||
195 switches::kHistoryEnableGroupByDomain)); 195 base::CommandLine::ForCurrentProcess()->HasSwitch(
196 switches::kHistoryEnableGroupByDomain));
196 bool allow_deleting_history = 197 bool allow_deleting_history =
197 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory); 198 prefs->GetBoolean(prefs::kAllowDeletingBrowserHistory);
198 source->AddBoolean("allowDeletingHistory", allow_deleting_history); 199 source->AddBoolean("allowDeletingHistory", allow_deleting_history);
199 source->AddBoolean("isInstantExtendedApiEnabled", 200 source->AddBoolean("isInstantExtendedApiEnabled",
200 chrome::IsInstantExtendedAPIEnabled()); 201 chrome::IsInstantExtendedAPIEnabled());
201 source->AddBoolean("isSupervisedProfile", profile->IsSupervised()); 202 source->AddBoolean("isSupervisedProfile", profile->IsSupervised());
202 source->AddBoolean("hideDeleteVisitUI", 203 source->AddBoolean("hideDeleteVisitUI",
203 profile->IsSupervised() && !allow_deleting_history); 204 profile->IsSupervised() && !allow_deleting_history);
204 205
205 source->SetJsonPath(kStringsJsFile); 206 source->SetJsonPath(kStringsJsFile);
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 Profile* profile = Profile::FromWebUI(web_ui); 1034 Profile* profile = Profile::FromWebUI(web_ui);
1034 content::WebUIDataSource::Add(profile, CreateHistoryUIHTMLSource(profile)); 1035 content::WebUIDataSource::Add(profile, CreateHistoryUIHTMLSource(profile));
1035 } 1036 }
1036 1037
1037 // static 1038 // static
1038 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes( 1039 base::RefCountedMemory* HistoryUI::GetFaviconResourceBytes(
1039 ui::ScaleFactor scale_factor) { 1040 ui::ScaleFactor scale_factor) {
1040 return ResourceBundle::GetSharedInstance(). 1041 return ResourceBundle::GetSharedInstance().
1041 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor); 1042 LoadDataResourceBytesForScale(IDR_HISTORY_FAVICON, scale_factor);
1042 } 1043 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698