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

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

Issue 10388197: Coverity: Fix a pass-by-value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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/extensions/extension_menu_manager.h" 5 #include "chrome/browser/extensions/extension_menu_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 11 matching lines...) Expand all
22 #include "content/public/common/context_menu_params.h" 22 #include "content/public/common/context_menu_params.h"
23 #include "ui/base/text/text_elider.h" 23 #include "ui/base/text/text_elider.h"
24 #include "ui/gfx/favicon_size.h" 24 #include "ui/gfx/favicon_size.h"
25 25
26 using content::WebContents; 26 using content::WebContents;
27 27
28 namespace { 28 namespace {
29 29
30 void SetIdKeyValue(base::DictionaryValue* properties, 30 void SetIdKeyValue(base::DictionaryValue* properties,
31 const char* key, 31 const char* key,
32 ExtensionMenuItem::Id id) { 32 const ExtensionMenuItem::Id& id) {
33 if (id.uid == 0) 33 if (id.uid == 0)
34 properties->SetString(key, id.string_uid); 34 properties->SetString(key, id.string_uid);
35 else 35 else
36 properties->SetInteger(key, id.uid); 36 properties->SetInteger(key, id.uid);
37 } 37 }
38 38
39 } // namespace 39 } // namespace
40 40
41 ExtensionMenuItem::ExtensionMenuItem(const Id& id, 41 ExtensionMenuItem::ExtensionMenuItem(const Id& id,
42 const std::string& title, 42 const std::string& title,
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 return true; 588 return true;
589 if (extension_id == other.extension_id) { 589 if (extension_id == other.extension_id) {
590 if (uid < other.uid) 590 if (uid < other.uid)
591 return true; 591 return true;
592 if (uid == other.uid) 592 if (uid == other.uid)
593 return string_uid < other.string_uid; 593 return string_uid < other.string_uid;
594 } 594 }
595 } 595 }
596 return false; 596 return false;
597 } 597 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698