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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 11726002: Move the parsing of 'update_url' & 'options_page' URLs out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: Created 7 years, 11 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
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/extensions/api/developer_private/developer_private_api. h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/devtools/devtools_window.h" 10 #include "chrome/browser/devtools/devtools_window.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 GURL icon = 94 GURL icon =
95 ExtensionIconSource::GetIconURL(&item, 95 ExtensionIconSource::GetIconURL(&item,
96 extension_misc::EXTENSION_ICON_MEDIUM, 96 extension_misc::EXTENSION_ICON_MEDIUM,
97 ExtensionIconSet::MATCH_BIGGER, 97 ExtensionIconSet::MATCH_BIGGER,
98 !info->enabled, 98 !info->enabled,
99 NULL); 99 NULL);
100 info->icon = icon.spec(); 100 info->icon = icon.spec();
101 101
102 info->homepage_url.reset(new std::string( 102 info->homepage_url.reset(new std::string(
103 extensions::ManifestURLInfo::GetHomepageURL(&item).spec())); 103 ManifestURLInfo::GetHomepageURL(&item).spec()));
104 if (!item.options_url().is_empty()) { 104 if (!ManifestURLInfo::GetOptionsPage(&item).is_empty()) {
105 info->options_url.reset(new std::string(item.options_url().spec())); 105 info->options_url.reset(new std::string(
106 ManifestURLInfo::GetOptionsPage(&item).spec()));
106 } 107 }
107 108
108 if (!item.update_url().is_empty()) { 109 if (!ManifestURLInfo::GetUpdateURL(&item).is_empty()) {
109 info->update_url.reset(new std::string( 110 info->update_url.reset(new std::string(
110 item.update_url().spec())); 111 ManifestURLInfo::GetUpdateURL(&item).spec()));
111 } 112 }
112 113
113 if (item.is_app()) { 114 if (item.is_app()) {
114 info->app_launch_url.reset(new std::string( 115 info->app_launch_url.reset(new std::string(
115 item.GetFullLaunchURL().spec())); 116 item.GetFullLaunchURL().spec()));
116 } 117 }
117 118
118 info->may_disable = system->management_policy()-> 119 info->may_disable = system->management_policy()->
119 UserMayModifySettings(&item, NULL); 120 UserMayModifySettings(&item, NULL);
120 info->is_app = item.is_app(); 121 info->is_app = item.is_app();
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 288
288 DevToolsWindow::OpenDevToolsWindow(host); 289 DevToolsWindow::OpenDevToolsWindow(host);
289 return true; 290 return true;
290 } 291 }
291 292
292 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {} 293 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {}
293 294
294 } // namespace api 295 } // namespace api
295 296
296 } // namespace extensions 297 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698