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

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

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 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
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 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // The time the record was generated (or some approximation). 60 // The time the record was generated (or some approximation).
61 const base::Time& time() const { return time_; } 61 const base::Time& time() const { return time_; }
62 void set_time(const base::Time& time) { time_ = time; } 62 void set_time(const base::Time& time) { time_ = time; }
63 63
64 // The ActionType distinguishes different classes of actions that can be 64 // The ActionType distinguishes different classes of actions that can be
65 // logged, and determines which other fields are expected to be filled in. 65 // logged, and determines which other fields are expected to be filled in.
66 ActionType action_type() const { return action_type_; } 66 ActionType action_type() const { return action_type_; }
67 67
68 // The specific API call used or accessed, for example "chrome.tabs.get". 68 // The specific API call used or accessed, for example "chrome.tabs.get".
69 const std::string& api_name() const { return api_name_; } 69 const std::string& api_name() const { return api_name_; }
70 void set_api_name(const std::string api_name) { api_name_ = api_name; } 70 void set_api_name(const std::string& api_name) { api_name_ = api_name; }
71 71
72 // Any applicable arguments. This might be null to indicate no data 72 // Any applicable arguments. This might be null to indicate no data
73 // available (a distinct condition from an empty argument list). 73 // available (a distinct condition from an empty argument list).
74 // mutable_args() returns a pointer to the list stored in the Action which 74 // mutable_args() returns a pointer to the list stored in the Action which
75 // can be modified in place; if the list was null an empty list is created 75 // can be modified in place; if the list was null an empty list is created
76 // first. 76 // first.
77 const base::ListValue* args() const { return args_.get(); } 77 const base::ListValue* args() const { return args_.get(); }
78 void set_args(scoped_ptr<base::ListValue> args); 78 void set_args(scoped_ptr<base::ListValue> args);
79 base::ListValue* mutable_args(); 79 base::ListValue* mutable_args();
80 80
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // comparisons. 162 // comparisons.
163 struct ActionComparatorExcludingTimeAndActionId { 163 struct ActionComparatorExcludingTimeAndActionId {
164 // Evaluates the comparison lhs < rhs. 164 // Evaluates the comparison lhs < rhs.
165 bool operator()(const scoped_refptr<Action>& lhs, 165 bool operator()(const scoped_refptr<Action>& lhs,
166 const scoped_refptr<Action>& rhs) const; 166 const scoped_refptr<Action>& rhs) const;
167 }; 167 };
168 168
169 } // namespace extensions 169 } // namespace extensions
170 170
171 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_ 171 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVITY_LOG_ACTIVITY_ACTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698