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

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

Issue 8113025: base::Bind: More converts, mostly in WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/bug_report_ui.h" 5 #include "chrome/browser/ui/webui/bug_report_ui.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/callback_old.h"
12 #include "base/logging.h" 11 #include "base/logging.h"
13 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
14 #include "base/message_loop.h" 13 #include "base/message_loop.h"
15 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
16 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
17 #include "base/values.h" 16 #include "base/values.h"
18 #include "chrome/browser/bug_report_data.h" 17 #include "chrome/browser/bug_report_data.h"
19 #include "chrome/browser/bug_report_util.h" 18 #include "chrome/browser/bug_report_util.h"
20 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // 1: about:system 426 // 1: about:system
428 dialog_defaults.Append(new StringValue(chrome::kChromeUISystemInfoURL)); 427 dialog_defaults.Append(new StringValue(chrome::kChromeUISystemInfoURL));
429 // Trigger the request for system information here. 428 // Trigger the request for system information here.
430 chromeos::system::SyslogsProvider* provider = 429 chromeos::system::SyslogsProvider* provider =
431 chromeos::system::SyslogsProvider::GetInstance(); 430 chromeos::system::SyslogsProvider::GetInstance();
432 if (provider) { 431 if (provider) {
433 syslogs_handle_ = provider->RequestSyslogs( 432 syslogs_handle_ = provider->RequestSyslogs(
434 true, // don't compress. 433 true, // don't compress.
435 chromeos::system::SyslogsProvider::SYSLOGS_FEEDBACK, 434 chromeos::system::SyslogsProvider::SYSLOGS_FEEDBACK,
436 &syslogs_consumer_, 435 &syslogs_consumer_,
437 NewCallback(bug_report_data_, &BugReportData::SyslogsComplete)); 436 base::Bind(&BugReportData::SyslogsComplete,
437 base::Unretained(bug_report_data_)));
438 } 438 }
439 // 2: user e-mail 439 // 2: user e-mail
440 dialog_defaults.Append(new StringValue(GetUserEmail())); 440 dialog_defaults.Append(new StringValue(GetUserEmail()));
441 #endif 441 #endif
442 442
443 web_ui_->CallJavascriptFunction("setupDialogDefaults", dialog_defaults); 443 web_ui_->CallJavascriptFunction("setupDialogDefaults", dialog_defaults);
444 } 444 }
445 445
446 void BugReportHandler::HandleRefreshCurrentScreenshot(const ListValue*) { 446 void BugReportHandler::HandleRefreshCurrentScreenshot(const ListValue*) {
447 std::string current_screenshot(kCurrentScreenshotUrl); 447 std::string current_screenshot(kCurrentScreenshotUrl);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 AddMessageHandler((handler)->Attach(this)); 615 AddMessageHandler((handler)->Attach(this));
616 616
617 // The handler's init will determine whether we show the error html page. 617 // The handler's init will determine whether we show the error html page.
618 ChromeWebUIDataSource* html_source = 618 ChromeWebUIDataSource* html_source =
619 CreateBugReportUIHTMLSource(handler->Init()); 619 CreateBugReportUIHTMLSource(handler->Init());
620 620
621 // Set up the chrome://bugreport/ source. 621 // Set up the chrome://bugreport/ source.
622 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); 622 Profile* profile = Profile::FromBrowserContext(tab->browser_context());
623 profile->GetChromeURLDataManager()->AddDataSource(html_source); 623 profile->GetChromeURLDataManager()->AddDataSource(html_source);
624 } 624 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/version_loader.cc ('k') | chrome/browser/ui/webui/chrome_url_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698