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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_actions.cc

Issue 23618010: [Activity log] Expose URL incognito state to private API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase (against latest) Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/activity_log/activity_actions.h" 5 #include "chrome/browser/extensions/activity_log/activity_actions.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 break; 161 break;
162 } 162 }
163 163
164 result->extension_id.reset(new std::string(extension_id())); 164 result->extension_id.reset(new std::string(extension_id()));
165 result->time.reset(new double(time().ToJsTime())); 165 result->time.reset(new double(time().ToJsTime()));
166 result->api_call.reset(new std::string(api_name())); 166 result->api_call.reset(new std::string(api_name()));
167 result->args.reset(new std::string(Serialize(args()))); 167 result->args.reset(new std::string(Serialize(args())));
168 if (page_url().is_valid()) { 168 if (page_url().is_valid()) {
169 if (!page_title().empty()) 169 if (!page_title().empty())
170 result->page_title.reset(new std::string(page_title())); 170 result->page_title.reset(new std::string(page_title()));
171 result->page_url.reset(new std::string(page_url().spec())); 171 result->page_url.reset(new std::string(SerializePageUrl()));
172 } 172 }
173 if (arg_url().is_valid()) 173 if (arg_url().is_valid())
174 result->arg_url.reset(new std::string(arg_url().spec())); 174 result->arg_url.reset(new std::string(SerializeArgUrl()));
175 result->extra.reset(new std::string(Serialize(other()))); 175 result->extra.reset(new std::string(Serialize(other())));
176 176
177 return result.Pass(); 177 return result.Pass();
178 } 178 }
179 179
180 std::string Action::PrintForDebug() const { 180 std::string Action::PrintForDebug() const {
181 std::string result = "ID=" + extension_id() + " CATEGORY="; 181 std::string result = "ID=" + extension_id() + " CATEGORY=";
182 switch (action_type_) { 182 switch (action_type_) {
183 case ACTION_API_CALL: 183 case ACTION_API_CALL:
184 result += "api_call"; 184 result += "api_call";
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 std::string rhs_other = ActivityLogPolicy::Util::Serialize(rhs->other()); 289 std::string rhs_other = ActivityLogPolicy::Util::Serialize(rhs->other());
290 if (lhs_other != rhs_other) 290 if (lhs_other != rhs_other)
291 return lhs_other < rhs_other; 291 return lhs_other < rhs_other;
292 } 292 }
293 293
294 // All fields compare as equal if this point is reached. 294 // All fields compare as equal if this point is reached.
295 return false; 295 return false;
296 } 296 }
297 297
298 } // namespace extensions 298 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/activity_log/activity_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698