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

Side by Side Diff: chrome/browser/extensions/api/downloads/downloads_api.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/downloads/downloads_api.h" 5 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 return true; 1517 return true;
1518 } 1518 }
1519 1519
1520 void DownloadsGetFileIconFunction::OnIconURLExtracted(const std::string& url) { 1520 void DownloadsGetFileIconFunction::OnIconURLExtracted(const std::string& url) {
1521 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1521 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1522 if (Fault(url.empty(), errors::kIconNotFound, &error_)) { 1522 if (Fault(url.empty(), errors::kIconNotFound, &error_)) {
1523 SendResponse(false); 1523 SendResponse(false);
1524 return; 1524 return;
1525 } 1525 }
1526 RecordApiFunctions(DOWNLOADS_FUNCTION_GET_FILE_ICON); 1526 RecordApiFunctions(DOWNLOADS_FUNCTION_GET_FILE_ICON);
1527 SetResult(base::MakeUnique<base::StringValue>(url)); 1527 SetResult(base::MakeUnique<base::Value>(url));
1528 SendResponse(true); 1528 SendResponse(true);
1529 } 1529 }
1530 1530
1531 ExtensionDownloadsEventRouter::ExtensionDownloadsEventRouter( 1531 ExtensionDownloadsEventRouter::ExtensionDownloadsEventRouter(
1532 Profile* profile, 1532 Profile* profile,
1533 DownloadManager* manager) 1533 DownloadManager* manager)
1534 : profile_(profile), 1534 : profile_(profile),
1535 notifier_(manager, this), 1535 notifier_(manager, this),
1536 extension_registry_observer_(this) { 1536 extension_registry_observer_(this) {
1537 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1537 DCHECK_CURRENTLY_ON(BrowserThread::UI);
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 return; 1920 return;
1921 base::Time now(base::Time::Now()); 1921 base::Time now(base::Time::Now());
1922 int delta = now.ToTimeT() - last_checked_removal_.ToTimeT(); 1922 int delta = now.ToTimeT() - last_checked_removal_.ToTimeT();
1923 if (delta <= kFileExistenceRateLimitSeconds) 1923 if (delta <= kFileExistenceRateLimitSeconds)
1924 return; 1924 return;
1925 last_checked_removal_ = now; 1925 last_checked_removal_ = now;
1926 manager->CheckForHistoryFilesRemoval(); 1926 manager->CheckForHistoryFilesRemoval();
1927 } 1927 }
1928 1928
1929 } // namespace extensions 1929 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698