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

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: fixed HomepageURLManifestTest.GetHomepageURL 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 GURL icon = 93 GURL icon =
94 ExtensionIconSource::GetIconURL(&item, 94 ExtensionIconSource::GetIconURL(&item,
95 extension_misc::EXTENSION_ICON_MEDIUM, 95 extension_misc::EXTENSION_ICON_MEDIUM,
96 ExtensionIconSet::MATCH_BIGGER, 96 ExtensionIconSet::MATCH_BIGGER,
97 !info->enabled, 97 !info->enabled,
98 NULL); 98 NULL);
99 info->icon = icon.spec(); 99 info->icon = icon.spec();
100 100
101 info->homepage_url.reset(new std::string( 101 info->homepage_url.reset(new std::string(
102 extensions::ManifestURL::GetHomepageURL(&item).spec())); 102 extensions::ManifestURL::GetHomepageURL(&item).spec()));
103 if (!item.options_url().is_empty()) { 103 if (!ManifestURL::GetOptionsPage(&item).is_empty()) {
104 info->options_url.reset(new std::string(item.options_url().spec())); 104 info->options_url.reset(
105 new std::string(ManifestURL::GetOptionsPage(&item).spec()));
105 } 106 }
106 107
107 if (!item.update_url().is_empty()) { 108 if (!ManifestURL::GetUpdateURL(&item).is_empty()) {
108 info->update_url.reset(new std::string( 109 info->update_url.reset(
109 item.update_url().spec())); 110 new std::string(ManifestURL::GetUpdateURL(&item).spec()));
110 } 111 }
111 112
112 if (item.is_app()) { 113 if (item.is_app()) {
113 info->app_launch_url.reset(new std::string( 114 info->app_launch_url.reset(new std::string(
114 item.GetFullLaunchURL().spec())); 115 item.GetFullLaunchURL().spec()));
115 } 116 }
116 117
117 info->may_disable = system->management_policy()-> 118 info->may_disable = system->management_policy()->
118 UserMayModifySettings(&item, NULL); 119 UserMayModifySettings(&item, NULL);
119 info->is_app = item.is_app(); 120 info->is_app = item.is_app();
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 286
286 DevToolsWindow::OpenDevToolsWindow(host); 287 DevToolsWindow::OpenDevToolsWindow(host);
287 return true; 288 return true;
288 } 289 }
289 290
290 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {} 291 DeveloperPrivateInspectFunction::~DeveloperPrivateInspectFunction() {}
291 292
292 } // namespace api 293 } // namespace api
293 294
294 } // namespace extensions 295 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/extensions/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698