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

Side by Side Diff: chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc

Issue 2259383002: Consistently use namespaced base::Version in extensions code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | chrome/browser/extensions/chrome_extensions_browser_client.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/api/runtime/chrome_runtime_api_delegate.h" 5 #include "chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 if (!browser) 330 if (!browser)
331 return false; 331 return false;
332 return extensions::ExtensionTabUtil::OpenOptionsPage(extension, browser); 332 return extensions::ExtensionTabUtil::OpenOptionsPage(extension, browser);
333 } 333 }
334 334
335 void ChromeRuntimeAPIDelegate::Observe( 335 void ChromeRuntimeAPIDelegate::Observe(
336 int type, 336 int type,
337 const content::NotificationSource& source, 337 const content::NotificationSource& source,
338 const content::NotificationDetails& details) { 338 const content::NotificationDetails& details) {
339 DCHECK_EQ(extensions::NOTIFICATION_EXTENSION_UPDATE_FOUND, type); 339 DCHECK_EQ(extensions::NOTIFICATION_EXTENSION_UPDATE_FOUND, type);
340 using UpdateDetails = const std::pair<std::string, Version>; 340 using UpdateDetails = const std::pair<std::string, base::Version>;
341 const std::string& id = content::Details<UpdateDetails>(details)->first; 341 const std::string& id = content::Details<UpdateDetails>(details)->first;
342 const Version& version = content::Details<UpdateDetails>(details)->second; 342 const base::Version& version =
343 content::Details<UpdateDetails>(details)->second;
343 if (version.IsValid()) { 344 if (version.IsValid()) {
344 CallUpdateCallbacks( 345 CallUpdateCallbacks(
345 id, UpdateCheckResult(true, kUpdateFound, version.GetString())); 346 id, UpdateCheckResult(true, kUpdateFound, version.GetString()));
346 } 347 }
347 } 348 }
348 349
349 void ChromeRuntimeAPIDelegate::OnExtensionInstalled( 350 void ChromeRuntimeAPIDelegate::OnExtensionInstalled(
350 content::BrowserContext* browser_context, 351 content::BrowserContext* browser_context,
351 const Extension* extension, 352 const Extension* extension,
352 bool is_update) { 353 bool is_update) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 const UpdateCheckResult& result) { 387 const UpdateCheckResult& result) {
387 auto it = update_check_info_.find(extension_id); 388 auto it = update_check_info_.find(extension_id);
388 if (it == update_check_info_.end()) 389 if (it == update_check_info_.end())
389 return; 390 return;
390 std::vector<UpdateCheckCallback> callbacks; 391 std::vector<UpdateCheckCallback> callbacks;
391 it->second.callbacks.swap(callbacks); 392 it->second.callbacks.swap(callbacks);
392 for (const auto& callback : callbacks) { 393 for (const auto& callback : callbacks) {
393 callback.Run(result); 394 callback.Run(result);
394 } 395 }
395 } 396 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_extensions_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698