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

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 10918065: Introduce structures to reduce the number of arguments in the FaviconService methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove the auxiliary structure for non-URL cases. Created 8 years, 3 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) 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/ntp/app_launcher_handler.h" 5 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 return; 699 return;
700 } 700 }
701 701
702 scoped_ptr<AppInstallInfo> install_info(new AppInstallInfo()); 702 scoped_ptr<AppInstallInfo> install_info(new AppInstallInfo());
703 install_info->is_bookmark_app = true; 703 install_info->is_bookmark_app = true;
704 install_info->title = title; 704 install_info->title = title;
705 install_info->app_url = launch_url; 705 install_info->app_url = launch_url;
706 install_info->page_ordinal = page_ordinal; 706 install_info->page_ordinal = page_ordinal;
707 707
708 FaviconService::Handle h = favicon_service->GetFaviconImageForURL( 708 FaviconService::Handle h = favicon_service->GetFaviconImageForURL(
709 profile, launch_url, history::FAVICON, gfx::kFaviconSize, 709 FaviconService::FaviconForURLParams(profile, launch_url, history::FAVICON,
James Hawkins 2012/09/05 22:39:50 nit: The start of param rows must align on the sam
710 &favicon_consumer_, 710 gfx::kFaviconSize, &favicon_consumer_),
711 base::Bind(&AppLauncherHandler::OnFaviconForApp, base::Unretained(this))); 711 base::Bind(&AppLauncherHandler::OnFaviconForApp, base::Unretained(this)));
712 favicon_consumer_.SetClientData(favicon_service, h, install_info.release()); 712 favicon_consumer_.SetClientData(favicon_service, h, install_info.release());
713 } 713 }
714 714
715 void AppLauncherHandler::HandleRecordAppLaunchByUrl( 715 void AppLauncherHandler::HandleRecordAppLaunchByUrl(
716 const base::ListValue* args) { 716 const base::ListValue* args) {
717 std::string url; 717 std::string url;
718 CHECK(args->GetString(0, &url)); 718 CHECK(args->GetString(0, &url));
719 double source; 719 double source;
720 CHECK(args->GetDouble(1, &source)); 720 CHECK(args->GetDouble(1, &source));
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 940
941 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() { 941 ExtensionInstallPrompt* AppLauncherHandler::GetExtensionInstallPrompt() {
942 if (!extension_install_ui_.get()) { 942 if (!extension_install_ui_.get()) {
943 Browser* browser = browser::FindBrowserWithWebContents( 943 Browser* browser = browser::FindBrowserWithWebContents(
944 web_ui()->GetWebContents()); 944 web_ui()->GetWebContents());
945 extension_install_ui_.reset( 945 extension_install_ui_.reset(
946 chrome::CreateExtensionInstallPromptWithBrowser(browser)); 946 chrome::CreateExtensionInstallPromptWithBrowser(browser));
947 } 947 }
948 return extension_install_ui_.get(); 948 return extension_install_ui_.get();
949 } 949 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/android/bookmarks_handler.cc ('k') | chrome/browser/ui/webui/ntp/favicon_webui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698