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

Side by Side Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 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
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/extension_web_ui.h" 5 #include "chrome/browser/extensions/extension_web_ui.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 it.Advance()) { 278 it.Advance()) {
279 const base::ListValue* url_list = NULL; 279 const base::ListValue* url_list = NULL;
280 if (!it.value().GetAsList(&url_list)) 280 if (!it.value().GetAsList(&url_list))
281 continue; 281 continue;
282 282
283 for (base::ListValue::const_iterator it2 = url_list->begin(); 283 for (base::ListValue::const_iterator it2 = url_list->begin();
284 it2 != url_list->end(); ++it2) { 284 it2 != url_list->end(); ++it2) {
285 std::string override; 285 std::string override;
286 if (!(*it2)->GetAsString(&override)) 286 if (!(*it2)->GetAsString(&override))
287 continue; 287 continue;
288 if (base::StartsWithASCII(url->spec(), override, true)) { 288 if (base::StartsWith(url->spec(), override,
289 base::CompareCase::SENSITIVE)) {
289 GURL original_url(content::kChromeUIScheme + std::string("://") + 290 GURL original_url(content::kChromeUIScheme + std::string("://") +
290 it.key() + url->spec().substr(override.length())); 291 it.key() + url->spec().substr(override.length()));
291 *url = original_url; 292 *url = original_url;
292 return true; 293 return true;
293 } 294 }
294 } 295 }
295 } 296 }
296 297
297 return false; 298 return false;
298 } 299 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, 432 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE,
432 gfx::Size(pixel_size, pixel_size), 433 gfx::Size(pixel_size, pixel_size),
433 resource_scale_factor)); 434 resource_scale_factor));
434 } 435 }
435 436
436 // LoadImagesAsync actually can run callback synchronously. We want to force 437 // LoadImagesAsync actually can run callback synchronously. We want to force
437 // async. 438 // async.
438 extensions::ImageLoader::Get(profile)->LoadImagesAsync( 439 extensions::ImageLoader::Get(profile)->LoadImagesAsync(
439 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); 440 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback));
440 } 441 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698