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

Unified Diff: chrome/browser/ui/webui/offline_internals_ui.cc

Issue 2180113003: Make sure the Async test cases availabel today generate correct ClientID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated per CR comments Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/offline_internals_ui.cc
diff --git a/chrome/browser/ui/webui/offline_internals_ui.cc b/chrome/browser/ui/webui/offline_internals_ui.cc
index c8e57eeb99b7911687fd750396bd44039770600f..8d42c3f331cc4ad2280c72d7af52996161b2f61f 100644
--- a/chrome/browser/ui/webui/offline_internals_ui.cc
+++ b/chrome/browser/ui/webui/offline_internals_ui.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/bind.h"
+#include "base/guid.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string_number_conversions.h"
@@ -336,8 +337,10 @@ void OfflineInternalsUIMessageHandler::HandleAddToRequestQueue(
std::string url;
CHECK(args->GetString(1, &url));
+ // To be visible in Downloads UI, these items need a well-formed GUID
+ // and AsyncNamespace in their ClientId.
std::ostringstream id_stream;
- id_stream << std::rand();
+ id_stream << base::GenerateGUID();
ResolveJavascriptCallback(
*callback_id,

Powered by Google App Engine
This is Rietveld 408576698