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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 386613002: FYI: Compile fixes when always using a local for method return value Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-nullable-method-return-type
Patch Set: Created 6 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 SpellCheckRequester* requester = spellCheckRequester(document); 1237 SpellCheckRequester* requester = spellCheckRequester(document);
1238 1238
1239 if (!requester) { 1239 if (!requester) {
1240 exceptionState.throwDOMException(InvalidAccessError, "No spell check req uestor can be obtained for the provided document."); 1240 exceptionState.throwDOMException(InvalidAccessError, "No spell check req uestor can be obtained for the provided document.");
1241 return -1; 1241 return -1;
1242 } 1242 }
1243 1243
1244 return requester->lastProcessedSequence(); 1244 return requester->lastProcessedSequence();
1245 } 1245 }
1246 1246
1247 Vector<AtomicString> Internals::userPreferredLanguages() const 1247 Vector<String> Internals::userPreferredLanguages() const
1248 { 1248 {
1249 return WebCore::userPreferredLanguages(); 1249 Vector<String> result;
1250 result.appendVector(WebCore::userPreferredLanguages());
1251 return result;
1250 } 1252 }
1251 1253
1252 // Optimally, the bindings generator would pass a Vector<AtomicString> here but 1254 // Optimally, the bindings generator would pass a Vector<AtomicString> here but
1253 // this is not supported yet. 1255 // this is not supported yet.
1254 void Internals::setUserPreferredLanguages(const Vector<String>& languages) 1256 void Internals::setUserPreferredLanguages(const Vector<String>& languages)
1255 { 1257 {
1256 Vector<AtomicString> atomicLanguages; 1258 Vector<AtomicString> atomicLanguages;
1257 for (size_t i = 0; i < languages.size(); ++i) 1259 for (size_t i = 0; i < languages.size(); ++i)
1258 atomicLanguages.append(AtomicString(languages[i])); 1260 atomicLanguages.append(AtomicString(languages[i]));
1259 WebCore::overrideUserPreferredLanguages(atomicLanguages); 1261 WebCore::overrideUserPreferredLanguages(atomicLanguages);
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA gent(); 1584 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA gent();
1583 if (!consoleAgent) 1585 if (!consoleAgent)
1584 return Vector<String>(); 1586 return Vector<String>();
1585 Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts(); 1587 Vector<unsigned> counts = consoleAgent->consoleMessageArgumentCounts();
1586 Vector<String> result(counts.size()); 1588 Vector<String> result(counts.size());
1587 for (size_t i = 0; i < counts.size(); i++) 1589 for (size_t i = 0; i < counts.size(); i++)
1588 result[i] = String::number(counts[i]); 1590 result[i] = String::number(counts[i]);
1589 return result; 1591 return result;
1590 } 1592 }
1591 1593
1592 Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadB ytes, unsigned long maxDeadBytes, unsigned long totalBytes) 1594 Vector<unsigned> Internals::setMemoryCacheCapacities(unsigned long minDeadBytes, unsigned long maxDeadBytes, unsigned long totalBytes)
1593 { 1595 {
1594 Vector<unsigned long> result; 1596 Vector<unsigned> result;
1595 result.append(memoryCache()->minDeadCapacity()); 1597 result.append(memoryCache()->minDeadCapacity());
1596 result.append(memoryCache()->maxDeadCapacity()); 1598 result.append(memoryCache()->maxDeadCapacity());
1597 result.append(memoryCache()->capacity()); 1599 result.append(memoryCache()->capacity());
1598 memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes); 1600 memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes);
1599 return result; 1601 return result;
1600 } 1602 }
1601 1603
1602 void Internals::setInspectorResourcesDataSizeLimits(int maximumResourcesContentS ize, int maximumSingleResourceContentSize, ExceptionState& exceptionState) 1604 void Internals::setInspectorResourcesDataSizeLimits(int maximumResourcesContentS ize, int maximumSingleResourceContentSize, ExceptionState& exceptionState)
1603 { 1605 {
1604 Page* page = contextDocument()->frame()->page(); 1606 Page* page = contextDocument()->frame()->page();
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 } 2355 }
2354 networkStateNotifier().setWebConnectionTypeForTest(webtype); 2356 networkStateNotifier().setWebConnectionTypeForTest(webtype);
2355 } 2357 }
2356 2358
2357 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context) 2359 unsigned Internals::countHitRegions(CanvasRenderingContext2D* context)
2358 { 2360 {
2359 return context->hitRegionsCount(); 2361 return context->hitRegionsCount();
2360 } 2362 }
2361 2363
2362 } // namespace WebCore 2364 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698