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

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

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/flags_ui.h" 5 #include "chrome/browser/ui/webui/flags_ui.h"
6 6
7 #include <string> 7 #include <string>
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) 203 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
204 version_info::Channel channel = chrome::GetChannel(); 204 version_info::Channel channel = chrome::GetChannel();
205 results.SetBoolean(flags_ui::kShowBetaChannelPromotion, 205 results.SetBoolean(flags_ui::kShowBetaChannelPromotion,
206 channel == version_info::Channel::STABLE); 206 channel == version_info::Channel::STABLE);
207 results.SetBoolean(flags_ui::kShowDevChannelPromotion, 207 results.SetBoolean(flags_ui::kShowDevChannelPromotion,
208 channel == version_info::Channel::BETA); 208 channel == version_info::Channel::BETA);
209 #else 209 #else
210 results.SetBoolean(flags_ui::kShowBetaChannelPromotion, false); 210 results.SetBoolean(flags_ui::kShowBetaChannelPromotion, false);
211 results.SetBoolean(flags_ui::kShowDevChannelPromotion, false); 211 results.SetBoolean(flags_ui::kShowDevChannelPromotion, false);
212 #endif 212 #endif
213 web_ui()->CallJavascriptFunction(flags_ui::kReturnExperimentalFeatures, 213 web_ui()->CallJavascriptFunctionUnsafe(flags_ui::kReturnExperimentalFeatures,
214 results); 214 results);
215 } 215 }
216 216
217 void FlagsDOMHandler::HandleEnableExperimentalFeatureMessage( 217 void FlagsDOMHandler::HandleEnableExperimentalFeatureMessage(
218 const base::ListValue* args) { 218 const base::ListValue* args) {
219 DCHECK(flags_storage_); 219 DCHECK(flags_storage_);
220 DCHECK_EQ(2u, args->GetSize()); 220 DCHECK_EQ(2u, args->GetSize());
221 if (args->GetSize() != 2) 221 if (args->GetSize() != 2)
222 return; 222 return;
223 223
224 std::string entry_internal_name; 224 std::string entry_internal_name;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 FlagsUI::~FlagsUI() { 335 FlagsUI::~FlagsUI() {
336 } 336 }
337 337
338 // static 338 // static
339 base::RefCountedMemory* FlagsUI::GetFaviconResourceBytes( 339 base::RefCountedMemory* FlagsUI::GetFaviconResourceBytes(
340 ui::ScaleFactor scale_factor) { 340 ui::ScaleFactor scale_factor) {
341 return ResourceBundle::GetSharedInstance(). 341 return ResourceBundle::GetSharedInstance().
342 LoadDataResourceBytesForScale(IDR_FLAGS_FAVICON, scale_factor); 342 LoadDataResourceBytesForScale(IDR_FLAGS_FAVICON, scale_factor);
343 } 343 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_loader_handler.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698