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

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

Issue 19234003: Extension activity log database refactoring (step 2) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address some reviewer comments Created 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <set> 5 #include <set>
6 #include <vector> 6 #include <vector>
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 282 }
283 283
284 // TODO(felt) Logging should be done more efficiently, so that it 284 // TODO(felt) Logging should be done more efficiently, so that it
285 // doesn't require construction of the action object. 285 // doesn't require construction of the action object.
286 scoped_refptr<APIAction> action = new APIAction( 286 scoped_refptr<APIAction> action = new APIAction(
287 extension_id, 287 extension_id,
288 base::Time::Now(), 288 base::Time::Now(),
289 type, 289 type,
290 api_call, 290 api_call,
291 MakeArgList(args), 291 MakeArgList(args),
292 *args,
292 extra); 293 extra);
293 294
294 observers_->Notify(&Observer::OnExtensionActivity, action); 295 observers_->Notify(&Observer::OnExtensionActivity, action);
295 if (testing_mode_) LOG(INFO) << action->PrintForDebug(); 296 if (testing_mode_) LOG(INFO) << action->PrintForDebug();
296 } else { 297 } else {
297 LOG(ERROR) << "Unknown API call! " << api_call; 298 LOG(ERROR) << "Unknown API call! " << api_call;
298 } 299 }
299 } 300 }
300 301
301 // A wrapper around LogAPIActionInternal, but we know it's an API call. 302 // A wrapper around LogAPIActionInternal, but we know it's an API call.
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 web_contents->GetTitle(), 506 web_contents->GetTitle(),
506 std::string(), // no api call here 507 std::string(), // no api call here
507 script_names.get(), 508 script_names.get(),
508 DomActionType::INSERTED, 509 DomActionType::INSERTED,
509 extra); 510 extra);
510 } 511 }
511 } 512 }
512 } 513 }
513 514
514 } // namespace extensions 515 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698