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

Side by Side Diff: content/public/browser/desktop_media_id.cc

Issue 1278973003: Revert of Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « content/common/plugin_list_win.cc ('k') | content/public/common/webplugininfo.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/public/browser/desktop_media_id.h" 5 #include "content/public/browser/desktop_media_id.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 aura::Window* DesktopMediaID::GetAuraWindowById(const DesktopMediaID& id) { 90 aura::Window* DesktopMediaID::GetAuraWindowById(const DesktopMediaID& id) {
91 return AuraWindowRegistry::GetInstance()->GetWindowById(id.aura_id); 91 return AuraWindowRegistry::GetInstance()->GetWindowById(id.aura_id);
92 } 92 }
93 93
94 #endif // defined(USE_AURA) 94 #endif // defined(USE_AURA)
95 95
96 DesktopMediaID::DesktopMediaID() = default; 96 DesktopMediaID::DesktopMediaID() = default;
97 97
98 // static 98 // static
99 DesktopMediaID DesktopMediaID::Parse(const std::string& str) { 99 DesktopMediaID DesktopMediaID::Parse(const std::string& str) {
100 std::vector<std::string> parts = base::SplitString( 100 std::vector<std::string> parts;
101 str, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 101 base::SplitString(str, ':', &parts);
102 102
103 #if defined(USE_AURA) 103 #if defined(USE_AURA)
104 if (parts.size() != 3) 104 if (parts.size() != 3)
105 return DesktopMediaID(); 105 return DesktopMediaID();
106 #else 106 #else
107 if (parts.size() != 2) 107 if (parts.size() != 2)
108 return DesktopMediaID(); 108 return DesktopMediaID();
109 #endif 109 #endif
110 110
111 Type type = TYPE_NONE; 111 Type type = TYPE_NONE;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 #if defined(USE_AURA) 154 #if defined(USE_AURA)
155 prefix.append(":"); 155 prefix.append(":");
156 prefix.append(base::Int64ToString(aura_id)); 156 prefix.append(base::Int64ToString(aura_id));
157 #endif // defined(USE_AURA) 157 #endif // defined(USE_AURA)
158 158
159 return prefix; 159 return prefix;
160 } 160 }
161 161
162 } // namespace content 162 } // namespace content
OLDNEW
« no previous file with comments | « content/common/plugin_list_win.cc ('k') | content/public/common/webplugininfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698