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

Side by Side Diff: chrome/browser/history/top_sites_extension_api.cc

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Synced. Created 8 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/history/top_sites_extension_api.h" 5 #include "chrome/browser/history/top_sites_extension_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/history/top_sites.h" 9 #include "chrome/browser/history/top_sites.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 23 matching lines...) Expand all
34 DictionaryValue* page_value = new DictionaryValue(); 34 DictionaryValue* page_value = new DictionaryValue();
35 page_value->SetString("url", url.url.spec()); 35 page_value->SetString("url", url.url.spec());
36 if (url.title.empty()) 36 if (url.title.empty())
37 page_value->SetString("title", url.url.spec()); 37 page_value->SetString("title", url.url.spec());
38 else 38 else
39 page_value->SetString("title", url.title); 39 page_value->SetString("title", url.title);
40 pages_value->Append(page_value); 40 pages_value->Append(page_value);
41 } 41 }
42 } 42 }
43 43
44 result_.reset(pages_value.release()); 44 SetResult(pages_value.release());
45 SendResponse(true); 45 SendResponse(true);
46 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698