diff --git a/src/applications/xhprof/controller/PhabricatorXHProfController.php b/src/applications/xhprof/controller/PhabricatorXHProfController.php --- a/src/applications/xhprof/controller/PhabricatorXHProfController.php +++ b/src/applications/xhprof/controller/PhabricatorXHProfController.php @@ -2,26 +2,4 @@ abstract class PhabricatorXHProfController extends PhabricatorController { - public function buildStandardPageResponse($view, array $data) { - $page = $this->buildStandardPageView(); - - $page->setApplicationName(pht('XHProf')); - $page->setBaseURI('/xhprof/'); - $page->setTitle(idx($data, 'title')); - $page->setGlyph("\xE2\x98\x84"); - $page->appendChild($view); - $page->setDeviceReady(true); - - $response = new AphrontWebpageResponse(); - - if (isset($data['frame'])) { - $response->setFrameable(true); - $page->setFrameable(true); - $page->setShowChrome(false); - $page->setDisableConsole(true); - } - - return $response->setContent($page->render()); - } - } diff --git a/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php b/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php --- a/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php +++ b/src/applications/xhprof/controller/PhabricatorXHProfProfileController.php @@ -47,11 +47,14 @@ $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('%s Profile', $symbol)); - return $this->buildStandardPageResponse( - array($crumbs, $view), - array( - 'title' => pht('Profile'), - 'frame' => $is_framed, - )); + $title = pht('Profile'); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->setFrameable(true) + ->setShowChrome(false) + ->setDisableConsole(true) + ->appendChild($view); } } diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -890,7 +890,8 @@ } else { $content = $this->render(); $response = id(new AphrontWebpageResponse()) - ->setContent($content); + ->setContent($content) + ->setFrameable($this->getFrameable()); } return $response;