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

Side by Side Diff: ios/chrome/browser/ui/webui/crashes_ui.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/ui/webui/crashes_ui.h" 5 #include "ios/chrome/browser/ui/webui/crashes_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 if (!first_load_) 116 if (!first_load_)
117 UpdateUI(); 117 UpdateUI();
118 } 118 }
119 119
120 void CrashesDOMHandler::UpdateUI() { 120 void CrashesDOMHandler::UpdateUI() {
121 bool crash_reporting_enabled = 121 bool crash_reporting_enabled =
122 IOSChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(); 122 IOSChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
123 base::ListValue crash_list; 123 base::ListValue crash_list;
124 if (crash_reporting_enabled) 124 if (crash_reporting_enabled)
125 crash::UploadListToValue(upload_list_.get(), &crash_list); 125 crash::UploadListToValue(upload_list_.get(), &crash_list);
126 base::FundamentalValue enabled(crash_reporting_enabled); 126 base::Value enabled(crash_reporting_enabled);
127 base::FundamentalValue dynamic_backend(false); 127 base::Value dynamic_backend(false);
128 base::FundamentalValue manual_uploads(false); 128 base::Value manual_uploads(false);
129 base::StringValue version(version_info::GetVersionNumber()); 129 base::StringValue version(version_info::GetVersionNumber());
130 base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " + 130 base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " +
131 base::SysInfo::OperatingSystemVersion()); 131 base::SysInfo::OperatingSystemVersion());
132 132
133 std::vector<const base::Value*> args; 133 std::vector<const base::Value*> args;
134 args.push_back(&enabled); 134 args.push_back(&enabled);
135 args.push_back(&dynamic_backend); 135 args.push_back(&dynamic_backend);
136 args.push_back(&manual_uploads); 136 args.push_back(&manual_uploads);
137 args.push_back(&crash_list); 137 args.push_back(&crash_list);
138 args.push_back(&version); 138 args.push_back(&version);
(...skipping 16 matching lines...) Expand all
155 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), 155 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui),
156 CreateCrashesUIHTMLSource()); 156 CreateCrashesUIHTMLSource());
157 } 157 }
158 158
159 // static 159 // static
160 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes( 160 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes(
161 ui::ScaleFactor scale_factor) { 161 ui::ScaleFactor scale_factor) {
162 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 162 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
163 IDR_CRASH_SAD_FAVICON, scale_factor); 163 IDR_CRASH_SAD_FAVICON, scale_factor);
164 } 164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698