Changeset 197532 in webkit


Ignore:
Timestamp:
Mar 3, 2016, 4:54:21 PM (9 years ago)
Author:
Gyuyoung Kim
Message:

Use std::make_unique<> when creating std::unique_ptr<>
https://bugs.webkit.org/show_bug.cgi?id=154574

Reviewed by Darin Adler.

  • NetworkProcess/cache/NetworkCacheStatistics.cpp:

(WebKit::NetworkCache::Statistics::open):

  • NetworkProcess/cache/NetworkCacheStatistics.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::createColorChooser):

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r197527 r197532  
     12016-03-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
     2
     3        Use std::make_unique<> when creating std::unique_ptr<>
     4        https://bugs.webkit.org/show_bug.cgi?id=154574
     5
     6        Reviewed by Darin Adler.
     7
     8        * NetworkProcess/cache/NetworkCacheStatistics.cpp:
     9        (WebKit::NetworkCache::Statistics::open):
     10        * NetworkProcess/cache/NetworkCacheStatistics.h:
     11        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     12        (WebKit::WebChromeClient::createColorChooser):
     13
    1142016-03-03  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp

    r194496 r197532  
    7979
    8080    String databasePath = WebCore::pathByAppendingComponent(cachePath, StatisticsDatabaseName);
    81     return std::unique_ptr<Statistics>(new Statistics(databasePath));
     81    return std::make_unique<Statistics>(databasePath);
    8282}
    8383
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h

    r183081 r197532  
    4545public:
    4646    static std::unique_ptr<Statistics> open(const String& cachePath);
     47    explicit Statistics(const String& databasePath);
    4748
    4849    void clear();
     
    5657
    5758private:
    58     explicit Statistics(const String& databasePath);
    59 
    6059    WorkQueue& serialBackgroundIOQueue() { return m_serialBackgroundIOQueue.get(); }
    6160
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r197478 r197532  
    702702std::unique_ptr<ColorChooser> WebChromeClient::createColorChooser(ColorChooserClient* client, const Color& initialColor)
    703703{
    704     return std::unique_ptr<WebColorChooser>(new WebColorChooser(m_page, client, initialColor));
     704    return std::make_unique<WebColorChooser>(m_page, client, initialColor);
    705705}
    706706#endif
Note: See TracChangeset for help on using the changeset viewer.