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

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

Issue 16625012: Remove ExtensionURLInfo, make security decisions in render process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address feedback Created 7 years, 5 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/chromeos/offline/offline_load_page.h" 5 #include "chrome/browser/chromeos/offline/offline_load_page.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = Profile::FromBrowserContext( 108 Profile* profile = Profile::FromBrowserContext(
109 web_contents_->GetBrowserContext()); 109 web_contents_->GetBrowserContext());
110 DCHECK(profile); 110 DCHECK(profile);
111 const extensions::Extension* extension = NULL; 111 const extensions::Extension* extension = NULL;
112 ExtensionService* extensions_service = 112 ExtensionService* extensions_service =
113 extensions::ExtensionSystem::Get(profile)->extension_service(); 113 extensions::ExtensionSystem::Get(profile)->extension_service();
114 // Extension service does not exist in test. 114 // Extension service does not exist in test.
115 if (extensions_service) 115 if (extensions_service)
116 extension = extensions_service->extensions()->GetHostedAppByURL( 116 extension = extensions_service->extensions()->GetHostedAppByURL(url_);
117 ExtensionURLInfo(url_));
118 117
119 if (extension) 118 if (extension)
120 GetAppOfflineStrings(extension, &strings); 119 GetAppOfflineStrings(extension, &strings);
121 else 120 else
122 GetNormalOfflineStrings(&strings); 121 GetNormalOfflineStrings(&strings);
123 122
124 base::StringPiece html( 123 base::StringPiece html(
125 ResourceBundle::GetSharedInstance().GetRawDataResource( 124 ResourceBundle::GetSharedInstance().GetRawDataResource(
126 IDR_OFFLINE_LOAD_HTML)); 125 IDR_OFFLINE_LOAD_HTML));
127 return webui::GetI18nTemplateHtml(html, &strings); 126 return webui::GetI18nTemplateHtml(html, &strings);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 for (size_t i = 0; i < cell_networks.size(); ++i) { 202 for (size_t i = 0; i < cell_networks.size(); ++i) {
204 chromeos::ActivationState activation_state = 203 chromeos::ActivationState activation_state =
205 cell_networks[i]->activation_state(); 204 cell_networks[i]->activation_state();
206 if (activation_state == ACTIVATION_STATE_ACTIVATED) 205 if (activation_state == ACTIVATION_STATE_ACTIVATED)
207 return false; 206 return false;
208 } 207 }
209 return true; 208 return true;
210 } 209 }
211 210
212 } // namespace chromeos 211 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698