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

Side by Side Diff: chrome/browser/chromeos/offline/offline_load_page.cc

Issue 5730004: Rename ExtensionsService to ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 10 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
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/cookies_tree_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/offline/offline_load_page.h" 5 #include "chrome/browser/chromeos/offline/offline_load_page.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/string_piece.h" 11 #include "base/string_piece.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/browser_list.h" 15 #include "chrome/browser/browser_list.h"
16 #include "chrome/browser/browser_thread.h" 16 #include "chrome/browser/browser_thread.h"
17 #include "chrome/browser/extensions/extensions_service.h" 17 #include "chrome/browser/extensions/extension_service.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/tab_contents/navigation_controller.h" 19 #include "chrome/browser/tab_contents/navigation_controller.h"
20 #include "chrome/browser/tab_contents/navigation_entry.h" 20 #include "chrome/browser/tab_contents/navigation_entry.h"
21 #include "chrome/browser/tab_contents/tab_contents.h" 21 #include "chrome/browser/tab_contents/tab_contents.h"
22 #include "chrome/browser/tab_contents/tab_util.h" 22 #include "chrome/browser/tab_contents/tab_util.h"
23 #include "chrome/browser/ui/browser.h" 23 #include "chrome/browser/ui/browser.h"
24 #include "chrome/common/extensions/extension.h" 24 #include "chrome/common/extensions/extension.h"
25 #include "chrome/common/jstemplate_builder.h" 25 #include "chrome/common/jstemplate_builder.h"
26 #include "chrome/common/notification_type.h" 26 #include "chrome/common/notification_type.h"
27 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 string16 failed_url(ASCIIToUTF16(url().spec())); 102 string16 failed_url(ASCIIToUTF16(url().spec()));
103 if (rtl) 103 if (rtl)
104 base::i18n::WrapStringWithLTRFormatting(&failed_url); 104 base::i18n::WrapStringWithLTRFormatting(&failed_url);
105 strings.SetString("url", failed_url); 105 strings.SetString("url", failed_url);
106 106
107 // The offline page for app has icons and slightly different message. 107 // The offline page for app has icons and slightly different message.
108 Profile* profile = tab()->profile(); 108 Profile* profile = tab()->profile();
109 DCHECK(profile); 109 DCHECK(profile);
110 const Extension* extension = NULL; 110 const Extension* extension = NULL;
111 ExtensionsService* extensions_service = profile->GetExtensionsService(); 111 ExtensionService* extensions_service = profile->GetExtensionService();
112 // Extension service does not exist in test. 112 // Extension service does not exist in test.
113 if (extensions_service) 113 if (extensions_service)
114 extension = extensions_service->GetExtensionByWebExtent(url()); 114 extension = extensions_service->GetExtensionByWebExtent(url());
115 115
116 if (extension) 116 if (extension)
117 GetAppOfflineStrings(extension, failed_url, &strings); 117 GetAppOfflineStrings(extension, failed_url, &strings);
118 else 118 else
119 GetNormalOfflineStrings(failed_url, &strings); 119 GetNormalOfflineStrings(failed_url, &strings);
120 120
121 base::StringPiece html( 121 base::StringPiece html(
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 registrar_.Remove(this, NotificationType::NETWORK_STATE_CHANGED, 220 registrar_.Remove(this, NotificationType::NETWORK_STATE_CHANGED,
221 NotificationService::AllSources()); 221 NotificationService::AllSources());
222 Proceed(); 222 Proceed();
223 } 223 }
224 } else { 224 } else {
225 InterstitialPage::Observe(type, source, details); 225 InterstitialPage::Observe(type, source, details);
226 } 226 }
227 } 227 }
228 228
229 } // namespace chromeos 229 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/cookies_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698