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

Side by Side Diff: chrome/browser/chromeos/login/help_app_launcher.cc

Issue 8827013: Move/replace/rename URL-based extension getters from ExtensionService to/in ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: id Created 9 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 | 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/chromeos/login/help_app_launcher.h" 5 #include "chrome/browser/chromeos/login/help_app_launcher.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 28 matching lines...) Expand all
39 ExtensionService* service = profile->GetExtensionService(); 39 ExtensionService* service = profile->GetExtensionService();
40 40
41 DCHECK(service); 41 DCHECK(service);
42 if (!service) 42 if (!service)
43 return; 43 return;
44 44
45 GURL url(base::StringPrintf(kHelpAppFormat, 45 GURL url(base::StringPrintf(kHelpAppFormat,
46 static_cast<int>(help_topic_id))); 46 static_cast<int>(help_topic_id)));
47 // HelpApp component extension presents only in official builds so we can 47 // HelpApp component extension presents only in official builds so we can
48 // show help only when the extensions is installed. 48 // show help only when the extensions is installed.
49 if (service->GetExtensionByURL(url)) 49 if (service->extensions()->GetByID(url.host()))
50 ShowHelpTopicDialog(GURL(url)); 50 ShowHelpTopicDialog(GURL(url));
51 } 51 }
52 52
53 /////////////////////////////////////////////////////////////////////////////// 53 ///////////////////////////////////////////////////////////////////////////////
54 // HelpApp, private: 54 // HelpApp, private:
55 55
56 void HelpAppLauncher::ShowHelpTopicDialog(const GURL& topic_url) { 56 void HelpAppLauncher::ShowHelpTopicDialog(const GURL& topic_url) {
57 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 57 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
58 dialog_.reset(new LoginHtmlDialog( 58 dialog_.reset(new LoginHtmlDialog(
59 this, 59 this,
60 parent_window_, 60 parent_window_,
61 UTF16ToWide( 61 UTF16ToWide(
62 l10n_util::GetStringUTF16(IDS_LOGIN_OOBE_HELP_DIALOG_TITLE)), 62 l10n_util::GetStringUTF16(IDS_LOGIN_OOBE_HELP_DIALOG_TITLE)),
63 topic_url, 63 topic_url,
64 LoginHtmlDialog::STYLE_BUBBLE)); 64 LoginHtmlDialog::STYLE_BUBBLE));
65 dialog_->Show(); 65 dialog_->Show();
66 } 66 }
67 67
68 } // namespace chromeos 68 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/offline/offline_load_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698